Get the inner HTML content of a selection.
@see http://stackoverflow.com/questions/4652734/return-html-from-a-user-selected-text/4652824#4652824
@param {Selection} sel
@return {String}
439225
function getHTML(sel) {
	sel = sel || getSelection();
	if (!sel.rangeCount || sel.isCollapsed) { return null; }

	var len = sel.rangeCount;
	var container = doc.createElement('div');

	for (var i = 0; i < len; ++i) {
		container.appendChild(sel.getRangeAt(i).cloneContents());
	}

	return container.innerHTML;
}
1106888
function selectText(element)
			{
				if(element)
				{
					var element = element[0];
					
					if (document.body.createTextRange)
					{
						var range = document.body.createTextRange();
						range.moveToElementText(element);
						range.select();
					}
					else if (window.getSelection)
					{
						var selection = window.getSelection();  
						var range = document.createRange();
						
						if(element != "undefined" && element != null)
						{
							range.selectNodeContents(element);
							
							selection.removeAllRanges();
							selection.addRange(range);
							
							if($(element).is(":empty"))
							{
								$(element).append("&nbsp;");
									selectText($(element));
							}
						}
					}
				}
			}
80384
function(options, select) {
                if (options.length === 0) {
                    return this.nonSelectedText;
                }
                else {
                    var selected = '';
                    options.each(function () {
                        selected += $(this).text() + ', ';
                    });
                    return selected.substr(0, selected.length - 2);
                }
            }
288287
public static Element getContentElementByHtml(String html) throws Exception {
        Document doc = Jsoup.parse(html);
        return getContentElementByDoc(doc);
    }
646923
function createHTML(htmlStr) {
        var frag = document.createDocumentFragment(),
            temp = document.createElement('div');
        temp.innerHTML = htmlStr;
        while (temp.firstChild) {
            frag.appendChild(temp.firstChild);
        }
        return frag;
    }
618267
def html(self):
        
        try:
            body = self.get_elm(tag_name='body')
        except selenium_exc.NoSuchElementException:
            return None
        else:
            return body.get_attribute('innerHTML')
1014398
def _ExtractDataFromShowHtml(self, html):
    
    htmlLines = html.splitlines()
    for count, line in enumerate(htmlLines):
      if line.strip() == r'<pre>':
        startLine = count+1
      if line.strip() == r'</pre>':
        endLine = count

    try:
      dataList = htmlLines[startLine:endLine]
      dataString = '\n'.join(dataList)
      return dataString.strip()
    except:
      raise Exception("Show content not found - check EPGuides html formatting")
895229
function strip(html) {
        var tmp = document.createElement('DIV');
        tmp.innerHTML = html;
        return tmp.textContent || tmp.innerText || '';
    }
304972
function() {
        if (this._element) {
          // Firefox versions < 11 do not have support for element.outerHTML.
          var thisElement = this.element();
          var outerHTML = thisElement.outerHTML;
          if (typeof outerHTML === 'undefined') {
            return jQuery('<div/>').append(thisElement).html();
          }
          return outerHTML;
        } else {
          return this.innerString();
        }
      }
591233
function selectHeadings (contentSelector, headingSelector) {
    var selectors = headingSelector
    if (options.ignoreSelector) {
      selectors = headingSelector.split(',')
        .map(function mapSelectors (selector) {
          return selector.trim() + ':not(' + options.ignoreSelector + ')'
        })
    }
    try {
      return document.querySelector(contentSelector)
        .querySelectorAll(selectors)
    } catch (e) {
      console.warn('Element not found: ' + contentSelector); // eslint-disable-line
      return null
    }
  }
439643
def innerHTML(self):
        '''
            
        '''

        # If a self-closing tag, there are no contents
        if self.isSelfClosing is True:
            return ''

        # Assemble all the blocks.
        ret = []

        # Iterate through blocks
        for block in self.blocks:
            # For each block:
            #   If a tag, append the outer html (start tag, contents, and end tag)
            #   Else, append the text node directly

            if isinstance(block, AdvancedTag):
                ret.append(block.outerHTML)
            else:
                ret.append(block)
        
        return ''.join(ret)
1126629
function(sel) {
      if (!this.length) {
        return this;
      }
      var matched = [],
    	 		el = this[0];

    	while (el = el.nextElementSibling) {
    		sel ?
    			(u(el).is(sel) && matched.push(el)) :
    			matched.push(el);
    	}
    	return u(matched);
    }
940222
function(html, tag) {
		var el = document.createElement(tag || 'div');
		el.innerHTML = html;
		return el;
	}
961609
function innertext (html) {
  // Drop everything inside <...> (i.e., tags/elements), and keep the text.
  // Unlike browser innerText, this removes newlines; it also doesn't handle
  // un-encoded `<` or `>` characters very well, so don't feed it malformed HTML
  return entities.decode(html.split(/<[^>]+>/)
    .map(function (chunk) { return chunk.trim() })
    .filter(function (trimmedChunk) { return trimmedChunk.length > 0 })
    .join(' ')
  );
}
861852
function getInnerHtmlFromElement(page, ph, selector, callback) {
    function getInnerHtml(selector) {
        return document.querySelector(selector).innerHTML;
    }

    page.evaluate(getInnerHtml, function (result) {
        if (result) {
            callback(null, page, ph, result);
        } else {
            var errorString = 'Error finding innerHTML';
            callback(errorString, page, ph, null);
        }
    }, selector);
}
653356
function htmlDecode(input) {
  if (input === " ") return input;
  const doc = new DOMParser().parseFromString(input.replace(/<[^>]+>/g, ""), "text/html");
  return doc.documentElement.textContent;
}
7510
function(o) {

        this.html = (typeof o === "string") ? o : o.html;

        var el = this.getContentEl();
        if (el) {
            el.innerHTML = this.html;
        }

    }