third_party/snap-it/popup.js
function unescapeHTML(html, nestingDepth) {
  var div = document.createElement('div');
  for (var i = 0; i < nestingDepth; i++) {
    div.innerHTML = `<iframe srcdoc="${html}"></iframe>`;
    html = div.childNodes[0].attributes.srcdoc.value;
  }
  return html;
}
function unescapeHTML(html, nestingDepth) {
  var div = document.createElement('div');
  for (var i = 0; i < nestingDepth; i++) {
    div.innerHTML = `<iframe srcdoc="${html}"></iframe>`;
    html = div.childNodes[0].attributes.srcdoc.value;
  }
  return html;
}
function unescapeHTML ( html , nestingDepth ) { var div = document . createElement ( 'div' ) ; for ( var i = 0 ; i < nestingDepth ; i ++ ) { div . innerHTML = ` ${ html } ` ; html = div . childNodes [ 0 ] . attributes . srcdoc . value ; } return html ; }
Take a string that represents valid HTML and unescape it so that it can be
rendered.

@param {string} html The HTML to unescape.
@param {number} nestingDepth The number of times the HTML must be unescaped.
@return {string} The unescaped HTML.
Take a string that represents valid HTML and unescape it so that it can be rendered .