Backed out changeset 1cd9e27f0fa1 (bug 1351608)

This commit is contained in:
Sebastian Hengst 2017-06-29 01:01:15 +02:00
Родитель 21dd68cb9e
Коммит 5b82b79d9c
65 изменённых файлов: 13 добавлений и 121 удалений

Просмотреть файл

@ -63,7 +63,6 @@
var shadow = component.createShadowRoot();
for (var child = component.firstChild; child; child = child.nextSibling) {
if (child.nodeType === 8)
// eslint-disable-next-line no-unsanitized/property
shadow.innerHTML = child.data;
}
}

Просмотреть файл

@ -177,13 +177,11 @@
errDesc = document.getElementById("ed_generic");
}
// eslint-disable-next-line no-unsanitized/property
document.querySelector(".title-text").innerHTML = errTitle.innerHTML;
var sd = document.getElementById("errorShortDescText");
if (sd) {
if (gIsCertError) {
// eslint-disable-next-line no-unsanitized/property
sd.innerHTML = errDesc.innerHTML;
} else {
sd.textContent = getDescription();
@ -203,7 +201,6 @@
var ld = document.getElementById("errorLongDesc");
if (ld) {
// eslint-disable-next-line no-unsanitized/property
ld.innerHTML = errDesc.innerHTML;
}

Просмотреть файл

@ -334,7 +334,6 @@ function showSnippets() {
if (snippets) {
// Injecting snippets can throw if they're invalid XML.
try {
// eslint-disable-next-line no-unsanitized/property
snippetsElt.innerHTML = snippets;
// Scripts injected by innerHTML are inactive, so we have to relocate them
// through DOM manipulation to activate their contents.

Просмотреть файл

@ -124,7 +124,6 @@ var gEMEHandler = {
// Do a little dance to get rich content into the notification:
let fragment = document.createDocumentFragment();
let descriptionContainer = document.createElement("description");
// eslint-disable-next-line no-unsanitized/property
descriptionContainer.innerHTML = message;
while (descriptionContainer.childNodes.length) {
fragment.appendChild(descriptionContainer.childNodes[0]);

Просмотреть файл

@ -620,7 +620,6 @@ ContentSearchUIController.prototype = {
}
let searchWithHeader = document.getElementById("contentSearchSearchWithHeader");
if (this.input.value) {
// eslint-disable-next-line no-unsanitized/property
searchWithHeader.innerHTML = this._strings.searchForSomethingWith;
searchWithHeader.querySelector(".contentSearchSearchWithHeaderSearchText").textContent = this.input.value;
} else {

Просмотреть файл

@ -40,7 +40,6 @@ async function doTest(parentTabSpec, childTabSpec, testTaskFn, waitForMetaRefres
// Add the link for the child tab to the page.
let mainDiv = content.document.createElement("div");
// eslint-disable-next-line no-unsanitized/property
mainDiv.innerHTML =
'<p><a id="linkToOpenInNewTab" href="' + childTabSpec + '">Link</a></p>';
content.document.body.appendChild(mainDiv);

Просмотреть файл

@ -35,7 +35,6 @@
is(blockedMixedDisplay, false, "OK: Should not block mixed display content!");
var newValue = "Verifying MCB does not trigger warning/error for an http page with https css that includes http font";
// eslint-disable-next-line no-unsanitized/property
document.getElementById("testDiv").innerHTML = newValue;
}
</script>

Просмотреть файл

@ -36,7 +36,6 @@
var newValue = "Verifying MCB does not trigger warning/error for an http page ";
newValue += "with https css that imports another http css which includes http font";
// eslint-disable-next-line no-unsanitized/property
document.getElementById("testDiv").innerHTML = newValue;
}
</script>

Просмотреть файл

@ -35,7 +35,6 @@
is(blockedMixedDisplay, false, "OK: Should not block mixed display content!");
var newValue = "Verifying MCB does not trigger warning/error for an http page with https css that includes http image";
// eslint-disable-next-line no-unsanitized/property
document.getElementById("testDiv").innerHTML = newValue;
}
</script>

Просмотреть файл

@ -18,7 +18,6 @@ try {
}
function message(m) {
// eslint-disable-next-line no-unsanitized/property
document.getElementById("message").innerHTML = m;
window.parent.postMessage(m, "*");
}

Просмотреть файл

@ -18,7 +18,6 @@ try {
}
function message(m) {
// eslint-disable-next-line no-unsanitized/property
document.getElementById("message").innerHTML = m;
window.parent.postMessage(m, "*");
}

Просмотреть файл

@ -331,7 +331,6 @@ const CustomizableWidgets = [
let promoParentElt = doc.getElementById("PanelUI-remotetabs-mobile-promo");
// Put it all together...
let contents = bundle.getFormattedString("appMenuRemoteTabs.mobilePromo.text2", formatArgs);
// eslint-disable-next-line no-unsanitized/property
promoParentElt.innerHTML = contents;
// We manually manage the "click" event to open the promo links because
// allowing the "text-link" widget handle it has 2 problems: (1) it only

Просмотреть файл

@ -711,7 +711,6 @@ CustomizeMode.prototype = {
// Put the tip contents in the popup.
let bundle = this.document.getElementById("bundle_browser");
const kLabelClass = "customization-tipPanel-link";
// eslint-disable-next-line no-unsanitized/property
messageNode.innerHTML = bundle.getFormattedString("customizeTips.tip0", [
"<label class=\"customization-tipPanel-em\" value=\"" +
bundle.getString("customizeTips.tip0.hint") + "\"/>",

Просмотреть файл

@ -12,7 +12,6 @@ async function getResultFromSharedworker(aBrowser) {
let result = await new Promise(resolve => {
worker.port.onmessage = function(e) {
// eslint-disable-next-line no-unsanitized/property
content.document.getElementById("display").innerHTML = e.data;
resolve(e.data);
};

Просмотреть файл

@ -10,7 +10,6 @@
<script type="text/javascript">
let bc = new BroadcastChannel("testBroadcastChannel");
bc.onmessage = function(e) {
// eslint-disable-next-line no-unsanitized/property
document.getElementById("display").innerHTML = e.data;
};
</script>

Просмотреть файл

@ -1,7 +1,5 @@
<meta charset="UTF-8">
Hi, I was opened via a <script>
// eslint-disable-next-line no-unsanitized/method
document.write(location.search ?
Hi, I was opened via a <script>document.write(location.search ?
"popup call from the opened window... uh oh, that shouldn't happen!" :
"bookmarklet, and I will open a new window myself.")</script><br>
<script>

Просмотреть файл

@ -262,7 +262,6 @@ var gSearchResultsPane = {
strings.getFormattedString("searchResults.sorryMessageUnix", [this.query]);
let helpUrl = Services.urlFormatter.formatURLPref("app.support.baseURL") + "preferences";
let brandName = document.getElementById("bundleBrand").getString("brandShortName");
// eslint-disable-next-line no-unsanitized/property
document.getElementById("need-help").innerHTML =
strings.getFormattedString("searchResults.needHelp2", [helpUrl, brandName]);
} else {

Просмотреть файл

@ -23,7 +23,6 @@
result["buildID"] = navigator.buildID;
result["hardwareConcurrency"] = navigator.hardwareConcurrency;
// eslint-disable-next-line no-unsanitized/property
document.getElementById("result").innerHTML = JSON.stringify(result);
}
</script>

Просмотреть файл

@ -20,7 +20,6 @@ function test() {
tab.linkedBrowser.removeEventListener("load", arguments.callee, true);
let iframes = tab.linkedBrowser.contentWindow.frames;
// eslint-disable-next-line no-unsanitized/property
iframes[1].document.body.innerHTML = uniqueValue;
frameCount = 0;

Просмотреть файл

@ -75,7 +75,6 @@ SyncedTabsDeckView.prototype = {
});
// Put it all together...
let contents = bundle.getFormattedString("appMenuRemoteTabs.mobilePromo.text2", formatArgs);
// eslint-disable-next-line no-unsanitized/property
this.container.querySelector(".device-promo").innerHTML = contents;
},

Просмотреть файл

@ -163,7 +163,6 @@ var onboardingTours = [
let div = win.document.createElement("div");
let defaultBrowserButtonId = win.matchMedia("(-moz-os-version: windows-win7)").matches ?
"onboarding.tour-default-browser.win7.button" : "onboarding.tour-default-browser.button";
// eslint-disable-next-line no-unsanitized/property
div.innerHTML = `
<section class="onboarding-tour-description">
<h1 data-l10n-id="onboarding.tour-default-browser.title"></h1>

Просмотреть файл

@ -378,10 +378,8 @@ this.ExtensionsUI = {
function eventCallback(topic) {
let doc = this.browser.ownerDocument;
if (topic == "showing") {
// eslint-disable-next-line no-unsanitized/property
doc.getElementById("addon-webext-perm-header").innerHTML = strings.header;
let textEl = doc.getElementById("addon-webext-perm-text");
// eslint-disable-next-line no-unsanitized/property
textEl.innerHTML = strings.text;
textEl.hidden = !strings.text;
@ -438,7 +436,6 @@ this.ExtensionsUI = {
];
win.PopupNotifications.show(browser, "addon-webext-permissions", "",
// eslint-disable-next-line no-unsanitized/property
"addons-notification-icon",
action, secondaryActions, popupOptions);
});
@ -479,10 +476,8 @@ this.ExtensionsUI = {
eventCallback(topic) {
if (topic == "showing") {
let doc = this.browser.ownerDocument;
// eslint-disable-next-line no-unsanitized/property
doc.getElementById("addon-installed-notification-header")
.innerHTML = msg1;
// eslint-disable-next-line no-unsanitized/property
doc.getElementById("addon-installed-notification-message")
.innerHTML = msg2;
} else if (topic == "dismissed") {

Просмотреть файл

@ -636,7 +636,6 @@ function prompt(aBrowser, aRequest) {
string = bundle.getFormattedString("getUserMedia.shareFirefoxWarning.message",
[brand, learnMore]);
}
// eslint-disable-next-line no-unsanitized/property
warning.innerHTML = string;
}

Просмотреть файл

@ -1388,7 +1388,6 @@ MarkupView.prototype = {
let injectedNodes = [];
container.undo.do(() => {
// eslint-disable-next-line no-unsanitized/method
this.walker.insertAdjacentHTML(node, position, value).then(nodeArray => {
injectedNodes = nodeArray.nodes;
return nodeArray;

Просмотреть файл

@ -388,7 +388,6 @@ AutocompletePopup.prototype = {
}
// Update the clone content to match the current list content.
// eslint-disable-next-line no-unsanitized/property
this._listClone.innerHTML = this._list.innerHTML;
this._activeElement.setAttribute("aria-activedescendant", id);

Просмотреть файл

@ -29,7 +29,6 @@ function runTest(index, host, doc) {
holder.id = options.name;
let body = doc.body;
body.appendChild(holder);
// eslint-disable-next-line no-unsanitized/property
holder.innerHTML = options.template;
info("Running " + options.name);

Просмотреть файл

@ -265,7 +265,6 @@ ColorWidget.prototype = {
this.element = this.parentEl.ownerDocument.createElementNS(XHTML_NS, "div");
this.element.className = "colorwidget-container";
// eslint-disable-next-line no-unsanitized/property
this.element.innerHTML = `
<div class="colorwidget-top">
<div class="colorwidget-fill"></div>

Просмотреть файл

@ -162,7 +162,6 @@ CSSFilterEditorWidget.prototype = {
let newPresetPlaceholder = L10N.getStr("newPresetPlaceholder");
let savePresetButton = L10N.getStr("savePresetButton");
// eslint-disable-next-line no-unsanitized/property
this.el.innerHTML = `
<div class="filters-list">
<div id="filters"></div>
@ -217,7 +216,6 @@ CSSFilterEditorWidget.prototype = {
let select = this.filterSelect;
filterList.forEach(filter => {
let option = this.doc.createElementNS(XHTML_NS, "option");
// eslint-disable-next-line no-unsanitized/property
option.innerHTML = option.value = filter.name;
select.appendChild(option);
});
@ -630,7 +628,6 @@ CSSFilterEditorWidget.prototype = {
*/
render: function () {
if (!this.filters.length) {
// eslint-disable-next-line no-unsanitized/property
this.filtersList.innerHTML = `<p> ${L10N.getStr("emptyFilterList")} <br />
${L10N.getStr("addUsingList")} </p>`;
this.emit("render");
@ -712,7 +709,6 @@ CSSFilterEditorWidget.prototype = {
}
if (!presets || !presets.length) {
// eslint-disable-next-line no-unsanitized/property
this.presetsList.innerHTML = `<p>${L10N.getStr("emptyPresetList")}</p>`;
this.emit("render");
return;

Просмотреть файл

@ -506,7 +506,6 @@ HTMLTooltip.prototype = {
if (this.type === TYPE.ARROW) {
html += '<div class="tooltip-arrow"></div>';
}
// eslint-disable-next-line no-unsanitized/property
container.innerHTML = html;
return container;
},

Просмотреть файл

@ -106,7 +106,6 @@ function setImageTooltip(tooltip, doc, imageUrl, options) {
<span class="theme-comment devtools-tooltip-caption">${label}</span>
</div>`;
}
// eslint-disable-next-line no-unsanitized/property
div.innerHTML = html;
// Calculate tooltip dimensions

Просмотреть файл

@ -819,7 +819,6 @@ Editor.prototype = {
let marker = cm.getWrapperElement().ownerDocument.createElement("div");
marker.className = markerClass;
// eslint-disable-next-line no-unsanitized/property
marker.innerHTML = content;
cm.setGutterMarker(info.line, gutterName, marker);
},

Просмотреть файл

@ -306,7 +306,6 @@ function* generateConsoleApiStubs() {
[key, code],
function ([subKey, subCode]) {
let script = content.document.createElement("script");
// eslint-disable-next-line no-unsanitized/property
script.innerHTML = `function triggerPacket() {${subCode}}`;
content.document.body.appendChild(script);
content.wrappedJSObject.triggerPacket();
@ -350,7 +349,6 @@ function* generateCssMessageStubs() {
[key, code],
function ([subKey, subCode]) {
let style = content.document.createElement("style");
// eslint-disable-next-line no-unsanitized/property
style.innerHTML = subCode;
content.document.body.appendChild(style);
}
@ -440,7 +438,6 @@ function* generateNetworkEventStubs() {
[key, code],
function ([subKey, subCode]) {
let script = content.document.createElement("script");
// eslint-disable-next-line no-unsanitized/property
script.innerHTML = `function triggerPacket() {${subCode}}`;
content.document.body.appendChild(script);
content.wrappedJSObject.triggerPacket();
@ -487,7 +484,6 @@ function* generatePageErrorStubs() {
[key, code],
function ([subKey, subCode]) {
let script = content.document.createElement("script");
// eslint-disable-next-line no-unsanitized/property
script.innerHTML = subCode;
content.document.body.appendChild(script);
script.remove();

Просмотреть файл

@ -177,7 +177,7 @@ stubPackets.set("GET request", {
},
{
"filename": "resource://testing-common/content-task.js line 52 > eval",
"lineNumber": 8,
"lineNumber": 7,
"columnNumber": 9,
"functionName": null,
"asyncCause": null
@ -250,7 +250,7 @@ stubPackets.set("XHR GET request", {
},
{
"filename": "resource://testing-common/content-task.js line 52 > eval",
"lineNumber": 8,
"lineNumber": 7,
"columnNumber": 9,
"functionName": null,
"asyncCause": null
@ -323,7 +323,7 @@ stubPackets.set("XHR POST request", {
},
{
"filename": "resource://testing-common/content-task.js line 52 > eval",
"lineNumber": 8,
"lineNumber": 7,
"columnNumber": 9,
"functionName": null,
"asyncCause": null

Просмотреть файл

@ -44,7 +44,7 @@ stubPreparedMessages.set("ReferenceError: asdf is not defined", new ConsoleMessa
},
{
"filename": "resource://testing-common/content-task.js line 52 > eval",
"lineNumber": 7,
"lineNumber": 6,
"columnNumber": 9,
"functionName": null
},
@ -80,7 +80,7 @@ stubPreparedMessages.set("SyntaxError: redeclaration of let a", new ConsoleMessa
"stacktrace": [
{
"filename": "resource://testing-common/content-task.js line 52 > eval",
"lineNumber": 7,
"lineNumber": 6,
"columnNumber": 9,
"functionName": null
},
@ -135,7 +135,7 @@ stubPreparedMessages.set("TypeError longString message", new ConsoleMessage({
},
{
"filename": "resource://testing-common/content-task.js line 52 > eval",
"lineNumber": 7,
"lineNumber": 6,
"columnNumber": 9,
"functionName": null
},
@ -197,7 +197,7 @@ stubPackets.set("ReferenceError: asdf is not defined", {
},
{
"filename": "resource://testing-common/content-task.js line 52 > eval",
"lineNumber": 7,
"lineNumber": 6,
"columnNumber": 9,
"functionName": null
},
@ -233,7 +233,7 @@ stubPackets.set("SyntaxError: redeclaration of let a", {
"stacktrace": [
{
"filename": "resource://testing-common/content-task.js line 52 > eval",
"lineNumber": 7,
"lineNumber": 6,
"columnNumber": 9,
"functionName": null
},
@ -289,7 +289,7 @@ stubPackets.set("TypeError longString message", {
},
{
"filename": "resource://testing-common/content-task.js line 52 > eval",
"lineNumber": 7,
"lineNumber": 6,
"columnNumber": 9,
"functionName": null
},

Просмотреть файл

@ -1997,7 +1997,6 @@ var WalkerActor = protocol.ActorClassWithSpec(walkerSpec, {
if (rawNode.nodeType !== rawNode.ownerDocument.ELEMENT_NODE) {
throw new Error("Can only change innerHTML to element nodes");
}
// eslint-disable-next-line no-unsanitized/property
rawNode.innerHTML = value;
},
@ -2037,14 +2036,12 @@ var WalkerActor = protocol.ActorClassWithSpec(walkerSpec, {
if (parsedDOM.head.innerHTML === "") {
parentNode.replaceChild(parsedDOM.body, rawNode);
} else {
// eslint-disable-next-line no-unsanitized/property
rawNode.outerHTML = value;
}
} else if (rawNode.tagName === "HEAD") {
if (parsedDOM.body.innerHTML === "") {
parentNode.replaceChild(parsedDOM.head, rawNode);
} else {
// eslint-disable-next-line no-unsanitized/property
rawNode.outerHTML = value;
}
} else if (node.isDocumentElement()) {
@ -2068,7 +2065,6 @@ var WalkerActor = protocol.ActorClassWithSpec(walkerSpec, {
rawNode.replaceChild(parsedDOM.head, rawNode.querySelector("head"));
rawNode.replaceChild(parsedDOM.body, rawNode.querySelector("body"));
} else {
// eslint-disable-next-line no-unsanitized/property
rawNode.outerHTML = value;
}
},

Просмотреть файл

@ -42,7 +42,6 @@ Test that css-logic calculates CSS specificity properly
function createDocument() {
let text = TEST_DATA.map(i=>i.text).join(",");
text = '<style type="text/css">' + text + " {color:red;}</style>";
// eslint-disable-next-line no-unsanitized/property
document.body.innerHTML = text;
}

Просмотреть файл

@ -597,7 +597,6 @@ Pref.prototype = {
this.li.setAttribute("contextmenu", "prefs-context-menu");
// Create list item outline, bind to object actions
// eslint-disable-next-line no-unsanitized/property
this.li.innerHTML =
"<div class='pref-name' " +
"onclick='AboutConfig.selectOrToggleBoolPref(event);'>" +

Просмотреть файл

@ -33,7 +33,6 @@ for (var y = 0; y < 2000; y += 100) {
g = g & 0xFC;
var b = (Math.floor(y / 3) % 256);
b = b & 0xF8;
// eslint-disable-next-line no-unsanitized/method
document.write("<div style='float: left; width: 100px; height: 100px; margin: 0; padding: 0; border: none; background-color: rgb(" + r + "," + g + "," + b + ")'> </div>\n");
}
document.write("</div>\n");

Просмотреть файл

@ -119,7 +119,6 @@
SpecialPowers.Ci.nsIDocShell).editor;
};
setValue = function(val) {
// eslint-disable-next-line no-unsanitized/property
contentEditable.innerHTML = val;
};
setSelection = function(pos) {
@ -137,7 +136,6 @@
SpecialPowers.Ci.nsIDocShell).editor;
};
setValue = function(val) {
// eslint-disable-next-line no-unsanitized/property
designMode.contentDocument.body.innerHTML = val;
};
setSelection = function(pos) {

16
npm-shrinkwrap.json сгенерированный
Просмотреть файл

@ -215,19 +215,7 @@
"integrity": "sha1-fImIOrDIX6XSi2ZqFKTpBqqQuJc="
},
"eslint-plugin-mozilla": {
"version": "file:tools/lint/eslint/eslint-plugin-mozilla",
"dependencies": {
"eslint-plugin-no-unsanitized": {
"version": "2.0.1",
"bundled": true
}
}
},
"eslint-plugin-no-unsanitized": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-no-unsanitized/-/eslint-plugin-no-unsanitized-2.0.1.tgz",
"integrity": "sha1-yt7dDQrRfI3FIm23/4hATlmo1n8=",
"dev": true
"version": "file:tools\\lint\\eslint\\eslint-plugin-mozilla"
},
"eslint-plugin-react": {
"version": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-6.10.3.tgz",
@ -240,7 +228,7 @@
}
},
"eslint-plugin-spidermonkey-js": {
"version": "file:tools/lint/eslint/eslint-plugin-spidermonkey-js"
"version": "file:tools\\lint\\eslint\\eslint-plugin-spidermonkey-js"
},
"espree": {
"version": "https://registry.npmjs.org/espree/-/espree-3.4.3.tgz",

Просмотреть файл

@ -10,12 +10,10 @@
"eslint-plugin-mozilla": "file:tools/lint/eslint/eslint-plugin-mozilla",
"eslint-plugin-react": "6.10.3",
"eslint-plugin-spidermonkey-js": "file:tools/lint/eslint/eslint-plugin-spidermonkey-js",
"eslint-plugin-no-unsanitized": "2.0.1",
"espree": "^3.4.0",
"estraverse": "^4.2.0",
"ini-parser": "^0.0.2",
"sax": "^1.2.2"
},
"devDependencies": {
"eslint-plugin-no-unsanitized": "^2.0.1"
}
}

Просмотреть файл

@ -2,7 +2,6 @@
"use strict";
document.open();
// eslint-disable-next-line no-unsanitized/method
document.write("This is insecure XSS script " + document.cookie);
isSecurityState("broken", "security broken after document write from unsecure script");
finish();

Просмотреть файл

@ -7,7 +7,6 @@
This is frame 1:
<script>
"use strict";
// eslint-disable-next-line no-unsanitized/method
document.write(location.href);
</script>
</body>

Просмотреть файл

@ -7,7 +7,6 @@
This is frame 2:
<script>
"use strict";
// eslint-disable-next-line no-unsanitized/method
document.write(location.href);
</script>
<iframe src="http://example.com/tests/security/manager/ssl/tests/mochitest/mixedcontent/iframe.html"></iframe>

Просмотреть файл

@ -19,7 +19,6 @@
<!-- This frame should be loaded over HTTPS to set the STS header. -->
This frame was loaded using
<script>
// eslint-disable-next-line no-unsanitized/method
document.write(document.location.protocol);
</script>
and set the STS header to force this site and allow subdomain upgrading.

Просмотреть файл

@ -19,7 +19,6 @@
<!-- This frame should be loaded over HTTPS to set the STS header. -->
This frame was loaded using
<script>
// eslint-disable-next-line no-unsanitized/method
document.write(document.location.protocol);
</script>
and set the STS header to force this site and allow subdomain upgrading.

Просмотреть файл

@ -19,7 +19,6 @@
<!-- This frame should be loaded over HTTPS to set the STS header. -->
This frame was loaded using
<script>
// eslint-disable-next-line no-unsanitized/method
document.write(document.location.protocol);
</script>
and set the STS header to force this site and allow subdomain upgrading.

Просмотреть файл

@ -29,17 +29,13 @@
function triggerBuildXpi() {
function $(id) { return document.getElementById(id); }
// eslint-disable-next-line no-unsanitized/property
$("status-text").innerHTML = "Preparing ...";
$("result").style.display = "none";
$("status").style.display = "inline";
createXpiDataUri(base, files, {
// eslint-disable-next-line no-unsanitized/property
onprogress(p) { $("status-text").innerHTML = "Preparing ... " + p.toFixed(0) + "%"; },
// eslint-disable-next-line no-unsanitized/property
onerror(e) { $("status-text").innerHTML = "Oops, couldn't generate XPI. Reload to retry.<br/>" + e; },
onsuccess(u) {

Просмотреть файл

@ -31,11 +31,8 @@
$("status").style.display = "inline";
createXpiDataUri(base, files, {
// eslint-disable-next-line no-unsanitized/property
onprogress(p) { $("status-text").innerHTML = "Preparing ... " + p.toFixed(0) + "%"; },
// eslint-disable-next-line no-unsanitized/property
onerror(e) { $("status-text").innerHTML = "Oops, couldn't generate XPI. Reload to retry.<br/>" + e; },
onsuccess(u) {

Просмотреть файл

@ -31,8 +31,6 @@
}
for (i = 0; i < 2000; i++) {
div = document.createElement("div");
// eslint-disable-next-line no-unsanitized/property
div.innerHTML = "<div role='progressbar'>progressbar</div>" +
"<span id='span" + i + "'>cb</span>";
container.appendChild(div);

Просмотреть файл

@ -100,8 +100,6 @@ function doneTest(dispResult) {
dispStats += "<hr/><b>Individual animations</b>:<br/>";
}
// eslint-disable-next-line no-unsanitized/property
$("run-results").innerHTML = "<hr/><br/>Results <button onclick='toClipboard(lastResults)'>[ Copy to clipboard as JSON ]</button>:<br/>" + dispStats + dispResult.join("<br/>");
}
}

Просмотреть файл

@ -67,8 +67,6 @@ Utilities:
<b>Configure DAMP</b> (CTRL-F5 to reset to talos defaults) <button type="button" onclick="deselectAll()">Deselect all tests</button><br/>
<script>
for (var test in defaultConfig.subtests) {
// eslint-disable-next-line no-unsanitized/method
document.write('<input type="checkbox" id="subtest-' + test + '" ' + (defaultConfig.subtests[test] ? "" : "un") + "checked>"
+ test + "</input>"
+ '<span style="color:grey">&nbsp;&nbsp;&nbsp;' + testsInfo[test] + "</span>"

Просмотреть файл

@ -113,8 +113,6 @@ function doneTest(dispResult) {
dispStats += "<hr/><b>Individual animations</b>:<br/>";
}
// eslint-disable-next-line no-unsanitized/property
$("run-results").innerHTML = "<hr/><br/>Results <button onclick='toClipboard(lastResults)'>[ Copy to clipboard as JSON ]</button>:<br/>" + dispStats + dispResult.join("<br/>");
}
}
@ -266,8 +264,6 @@ Utilities:
<b>Configure TART</b> (CTRL-F5 to reset to talos defaults) <button type="button" onclick="deselectAll()">Deselect all tests</button><br/>
<script>
for (var test in defaultConfig.subtests) {
// eslint-disable-next-line no-unsanitized/method
document.write('<input type="checkbox" id="subtest-' + test + '" ' + (defaultConfig.subtests[test] ? "" : "un") + "checked>"
+ test + "</input>"
+ '<span style="color:grey">&nbsp;&nbsp;&nbsp;' + testsInfo[test] + "</span>"

Просмотреть файл

@ -42,7 +42,6 @@ function NarrateControls(mm, win, languagePromise) {
dropdown.id = "narrate-dropdown";
// We need inline svg here for the animation to work (bug 908634 & 1190881).
// The style animation can't be scoped (bug 830056).
// eslint-disable-next-line no-unsanitized/property
dropdown.innerHTML =
localize`<style scoped>
@import url("chrome://global/skin/narrateControls.css");

Просмотреть файл

@ -13,7 +13,6 @@ function VoiceSelect(win, label) {
let element = win.document.createElement("div");
element.classList.add("voiceselect");
// eslint-disable-next-line no-unsanitized/property
element.innerHTML =
`<button class="select-toggle" aria-controls="voice-options">
<span class="label">${label}</span> <span class="current-voice"></span>

Просмотреть файл

@ -121,7 +121,6 @@ add_task(async function test() {
let processedFormPromise = promiseFormsProcessed(numFormLikesExpected);
// eslint-disable-next-line no-unsanitized/property
frameDoc.documentElement.innerHTML = tc.document;
info("waiting for " + numFormLikesExpected + " processed form(s)");
await processedFormPromise;

Просмотреть файл

@ -140,7 +140,6 @@ add_task(async function test() {
for (let tc of TESTCASES) {
info("Starting testcase: " + JSON.stringify(tc));
// eslint-disable-next-line no-unsanitized/property
frameDoc.documentElement.innerHTML = tc.document;
let inputForFormLike = frameDoc.querySelectorAll("input")[tc.inputIndexForFormLike];

Просмотреть файл

@ -148,7 +148,6 @@ add_task(async function test() {
await loadedPromise;
let frameDoc = SpecialPowers.wrap(loginFrame.contentWindow).document;
// eslint-disable-next-line no-unsanitized/property
frameDoc.documentElement.innerHTML = tc.document;
// Wait for the form to be processed before trying to submit.
await promiseFormsProcessed();

Просмотреть файл

@ -101,7 +101,6 @@ add_task(async function test() {
await loadedPromise;
let frameDoc = SpecialPowers.wrap(loginFrame.contentWindow).document;
// eslint-disable-next-line no-unsanitized/property
frameDoc.documentElement.innerHTML = tc.document;
// Wait for the form to be processed before trying to submit.

Просмотреть файл

@ -113,7 +113,6 @@ async function reinitializeForm(index) {
let form = document.getElementById("form" + index);
let temp = form.innerHTML;
form.innerHTML = "";
// eslint-disable-next-line no-unsanitized/property
form.innerHTML = temp;
await new Promise(resolve => {

Просмотреть файл

@ -266,8 +266,6 @@ var Settings = {
let parameters = [fhrEnabled, extendedEnabled].map(this.convertStringToLink);
let explanation = bundle.formatStringFromName("homeExplanation", parameters, 2);
// eslint-disable-next-line no-unsanitized/property
homeExplanation.innerHTML = explanation;
this.attachObservers()
},
@ -337,8 +335,6 @@ var PingPicker = {
let explanation = bundle.formatStringFromName("pingExplanation", [pingLink, pingName], 2);
let pingExplanation = document.getElementById("ping-explanation");
// eslint-disable-next-line no-unsanitized/property
pingExplanation.innerHTML = explanation;
GenericSubsection.deleteAllSubSections();
},

Просмотреть файл

@ -140,7 +140,6 @@ Control.prototype = {
this.ctrl.textContent = this._label;
if (this._message) {
// eslint-disable-next-line no-unsanitized/property
this.msg.innerHTML =
`<span class="info-label">${this._messageHeader}:</span> ${this._message}`;
} else {
@ -306,7 +305,6 @@ var AboutWebRTC = {
msg.textContent = getString("cannot_retrieve_log");
parent.appendChild(msg);
msg = document.createElement("p");
// eslint-disable-next-line no-unsanitized/property
msg.innerHTML = `${data.error.name}: ${data.error.message}`;
parent.appendChild(msg);
return;

Просмотреть файл

@ -15,7 +15,6 @@
var strBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"].getService(Ci.nsIStringBundleService);
var pluginsbundle = strBundleService.createBundle("chrome://global/locale/plugins.properties");
// eslint-disable-next-line no-unsanitized/method
document.writeln("<title>" + pluginsbundle.GetStringFromName("title_label") + "<\/title>");
</script>
<link rel="stylesheet" type="text/css" href="chrome://global/content/plugins.css">

Просмотреть файл

@ -204,7 +204,6 @@ var FormDataInternal = {
// designMode is undefined e.g. for XUL documents (as about:config)
if ((doc.designMode || "") == "on" && doc.body) {
// eslint-disable-next-line no-unsanitized/property
ret.innerHTML = doc.body.innerHTML;
}
@ -262,7 +261,6 @@ var FormDataInternal = {
if ("innerHTML" in data) {
if (doc.body && doc.designMode == "on") {
// eslint-disable-next-line no-unsanitized/property
doc.body.innerHTML = data.innerHTML;
this.fireEvent(doc.body, "input");
}

Просмотреть файл

@ -3253,7 +3253,6 @@ var gDetailView = {
// plugins without having bug 624602 fixed yet, and intentionally ignores
// localisation.
if (aAddon.isGMPlugin) {
// eslint-disable-next-line no-unsanitized/property
fullDesc.innerHTML = aAddon.fullDescription;
} else {
fullDesc.textContent = aAddon.fullDescription;