Skip to content

Commit

Permalink
Bug 1433708: Part 3 - Fix Fennec about:config innerHTML sanitization.…
Browse files Browse the repository at this point in the history
… r=mconley

MozReview-Commit-ID: J9tmYCGfOcB

--HG--
extra : rebase_source : 9adbee0d98ea9928377f2f8b8c3ad8be00e4d795
  • Loading branch information
kmaglione committed Jan 26, 2018
1 parent 952665b commit 6b36043
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mobile/android/chrome/content/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -606,8 +606,7 @@ 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 =
this.li.unsafeSetInnerHTML(
"<div class='pref-name' " +
"onclick='AboutConfig.selectOrToggleBoolPref(event);'>" +
this.escapeHTML(this.name) +
Expand All @@ -631,7 +630,7 @@ Pref.prototype = {
"<div class='pref-button down' " +
"onclick='AboutConfig.incrOrDecrIntPref(event, -1);'>" +
"</div>" +
"</div>";
"</div>");

// Delay providing the list item values, until the LI is returned and added to the document
setTimeout(this._valueSetup.bind(this), INNERHTML_VALUE_DELAY);
Expand Down

0 comments on commit 6b36043

Please sign in to comment.