Strips `<link rel="import" href="">` tags.

@param inputTree
@param options {
extensions: ['html']
excludes: ['regex']
}
511267
function Stripper(inputTree, options) {
  if (!(this instanceof Stripper)) {
    return new Stripper(inputTree, options);
  }

  this.inputTree = inputTree;

  options = options || {};
  this.extensions = options.extensions || ['html'];
  this.excludes = options.excludes;
}
491230
public void addSrcLink(Element typeElement, Content label, Content htmltree) {
        if (typeElement == null) {
            return;
        }
        TypeElement te = utils.getEnclosingTypeElement(typeElement);
        if (te == null) {
            // must be a typeElement since in has no containing class.
            te = (TypeElement) typeElement;
        }
        DocPath href = pathToRoot
                .resolve(DocPaths.SOURCE_OUTPUT)
                .resolve(DocPath.forClass(utils, te));
        Content linkContent = getHyperLink(href
                .fragment(SourceToHTMLConverter.getAnchorName(utils, typeElement)), label, "", "");
        htmltree.addContent(linkContent);
    }
1246302
private void MungeInput() {
        int srci = 0;
        int dsti = 0;
        byte b;
        boolean  inMarkup = false;
        int      openTags = 0;
        int      badTags  = 0;
        
        //
        //  html / xml markup stripping.
        //     quick and dirty, not 100% accurate, but hopefully good enough, statistically.
        //     discard everything within < brackets >
        //     Count how many total '<' and illegal (nested) '<' occur, so we can make some
        //     guess as to whether the input was actually marked up at all.
        if (fStripTags) {
            for (srci = 0; srci < fRawLength && dsti < fInputBytes.length; srci++) {
                b = fRawInput[srci];
                if (b == (byte)'<') {
                    if (inMarkup) {
                        badTags++;
                    }
                    inMarkup = true;
                    openTags++;
                }
                
                if (! inMarkup) {
                    fInputBytes[dsti++] = b;
                }
                
                if (b == (byte)'>') {
                    inMarkup = false;
                }        
            }
            
            fInputLen = dsti;
        }
        
        //
        //  If it looks like this input wasn't marked up, or if it looks like it's
        //    essentially nothing but markup abandon the markup stripping.
        //    Detection will have to work on the unstripped input.
        //
        if (openTags<5 || openTags/5 < badTags || 
                (fInputLen < 100 && fRawLength>600)) {
            int limit = fRawLength;
            
            if (limit > kBufSize) {
                limit = kBufSize;
            }
            
            for (srci=0; srci<limit; srci++) {
                fInputBytes[srci] = fRawInput[srci];
            }
            fInputLen = srci;
        }
        
        //
        // Tally up the byte occurence statistics.
        //   These are available for use by the various detectors.
        //
        Arrays.fill(fByteStats, (short)0);
        for (srci=0; srci<fInputLen; srci++) {
            int val = fInputBytes[srci] & 0x00ff;
            fByteStats[val]++;
        }
        
        fC1Bytes = false;
        for (int i = 0x80; i <= 0x9F; i += 1) {
            if (fByteStats[i] != 0) {
                fC1Bytes = true;
                break;
            }
        }
     }
690013
private String removeScriptTags(String input) {

        Pattern removePattern = Pattern.compile("<script[^>]*?>[\\s\\S]*?<\\/script>");
        Matcher match = removePattern.matcher(input);
        return match.replaceAll("");
    }
213256
def remove_html_tag(input_str='', tag=None):
    
    result = input_str
    if tag is not None:
        pattern = re.compile('<{tag}[\s\S]+?/{tag}>'.format(tag=tag))
        result = re.sub(pattern, '', str(input_str))

    return result
131650
def strip_tags(self, content, smart=False):
        
        from lxml.html import fromstring

        return get_node_text(fromstring(content), smart=smart)
72581
protected void addLinkToMainTree(Content div) {
        Content span = HtmlTree.SPAN(HtmlStyle.packageHierarchyLabel,
                getResource("doclet.Package_Hierarchies"));
        div.addContent(span);
        HtmlTree ul = new HtmlTree (HtmlTag.UL);
        ul.addStyle(HtmlStyle.horizontal);
        ul.addContent(getNavLinkMainTree(configuration.getText("doclet.All_Packages")));
        div.addContent(ul);
    }
564039
function Draggabilly( element, options ) {
  // querySelector if string
  this.element = typeof element == 'string' ?
    document.querySelector( element ) : element;

  if ( jQuery ) {
    this.$element = jQuery( this.element );
  }

  // options
  this.options = extend( {}, this.constructor.defaults );
  this.option( options );

  this._create();
}
353135
function(options) {
        var nextNode = node.nextSibling,
            types = (options && options.nodeTypes) ? options.nodeTypes : defaultNodeTypes;
        
        if (!nextNode) {
          return null;
        }

        if (
          (!wysihtml5.lang.array(types).contains(nextNode.nodeType)) || // nodeTypes check.
          (options && options.ignoreBlankTexts && _isBlankText(nextNode)) // blank text nodes bypassed if set
        ) {
          return wysihtml5.dom.domNode(nextNode).next(options);
        }
        
        return nextNode;
      }
714985
function _link (input, options) {
  if (typeof input !== 'string') return null

  var linked, matches, namepath
  var output = {}

  /*
  test input for
  1. A type expression containing a namepath, e.g. Array.<module:Something>
  2. a namepath referencing an `id`
  3. a namepath referencing a `longname`
  */
  if ((matches = input.match(/.*?<(.*?)>/))) {
    namepath = matches[1]
  } else {
    namepath = input
  }

  options.hash = { id: namepath }
  linked = _identifier(options)
  if (!linked) {
    options.hash = { longname: namepath }
    linked = _identifier(options)
  }
  if (!linked) {
    return { name: input, url: null }
  } else {
    output.name = input.replace(namepath, linked.name)
    if (isExternal.call(linked)) {
      if (linked.description) {
        output.url = '#' + anchorName.call(linked, options)
      } else {
        if (linked.see && linked.see.length) {
          var firstLink = parseLink(linked.see[0])[0]
          output.url = firstLink ? firstLink.url : linked.see[0]
        } else {
          output.url = null
        }
      }
    } else {
      output.url = '#' + anchorName.call(linked, options)
    }
    return output
  }
}
729353
function XSSFilter(options) {
    // 初始化配置
    this.config = {
        // 是否匹配 style 标签
        matchStyleTag: true,

        // 是否匹配 script 标签
        matchScriptTag: true,

        // 是否要删除匹配到的标签，如果设置为 false，则对标签进行转义
        removeMatchedTag: true,

        // 是否对整个字符串进行转义，默认不转义
        escape: false,

        // 标签属性黑名单列表，在这个列表中的属性将被清除
        blackListAttrs: {
            onclick: true,
            ondblclick: true,
            onchange: true,
            onblur: true,
            onfocus: true,
            onkeydown: true,
            onkeypress: true,
            onkeyup: true,
            onmousedown: true,
            onmousemove: true,
            onmouseover: true,
            onmouseout: true,
            onmouseup: true,
            onselect: true,
            onsubmit: true,
            onreset: true,
            onload: true,
            onabort: true,
            onerror: true
        }
    };

    // 实例化时扩展初始化配置
    if (utils.isObject(options)) {
        utils.extend(this.config, options);
    }
}
447049
def delete_tags(self, arg):
        

        if len(arg) > 0:
            raw = html.fromstring(arg)
            return raw.text_content().strip()

        return arg
967076
function PbfSplicer(options) {
  // tag which will be auto-removed and auto-injected. Usually 'name'
  this.nameTag = options.nameTag;
  // tag that contains JSON initially, and which works as a prefix for multiple values
  this.multiTag = options.multiTag;

  // If options.namePicker is given, this class converts multiple language tags into one
  // Otherwise, it assumes that a single name_ tag exists with JSON content, and it will replace
  // it with multiple tags "name_en", "name_fr", ... depending on the JSON language codes
  this.namePicker = options.namePicker;

  // Flag to make requested_name (local_name) form
  this.combineName = options.combineName;
}
876832
function ToJSFilter (inputTree, options) {
    if (!(this instanceof ToJSFilter)) {
        return new ToJSFilter(inputTree, options);
    }
    options = options || {};
    options.extensions = options.extensions || ['txt'];
    options.targetExtension = 'js';
    Filter.call(this, inputTree, options);
    this.trimFiles = options.trimFiles || false;
}
368796
function(options) {
      
      this.options = {};
      this.options.id = lang.isString(options.id) ? options.id  : Dom.generateId();
      this.options.className = options.className || "inputEx-Button";
      this.options.parentEl = lang.isString(options.parentEl) ? Dom.get(options.parentEl) : options.parentEl;
      
      // default type === "submit"
      this.options.type = (options.type === "link" || options.type === "submit-link") ? options.type : "submit";
      
      // value is the text displayed inside the button (<input type="submit" value="Submit" /> convention...)
      this.options.value = options.value;
      
      this.options.disabled = !!options.disabled;
      
      if (lang.isFunction(options.onClick)) {
         this.options.onClick = {fn: options.onClick, scope:this};
         
      } else if (lang.isObject(options.onClick)) {
         this.options.onClick = {fn: options.onClick.fn, scope: options.onClick.scope || this};
      }
      
   }
1082247
public HTMLGen imports(Imports imports) {
		//this.imports=imports;
		for(String str : imports.css) {
			forward.print("<link rel=\"stylesheet\" href=\"");
			forward.print(imports.themePath(null));
			forward.print(str);
			forward.println("\">");
		}

		for(String str : imports.js) {
			forward.print("<script type=\"text/javascript\" src=\"");
			forward.print(imports.themePath(null));
			forward.print(str);
			forward.println("\"></script>");
		}
		return this;
	}
1224700
public void setPattern(Tag tag, String regex) {
		if (Strings.isNullOrEmpty(regex)) {
			this.rawPatterns.remove(tag);
			this.compiledPatterns.remove(tag);
		} else {
			this.rawPatterns.put(tag, regex);
			this.compiledPatterns.put(tag, Pattern.compile("^\\s*" + regex, PATTERN_COMPILE_OPTIONS)); //$NON-NLS-1$
		}
	}