Bug 1551320 - Replace one more createElement with createElementNS. r=bgrins
authorBrendan Dahl <brendan.dahl@gmail.com>
Tue, 21 May 2019 18:12:31 +0000
changeset 474809 3c824624aa30a223ba960b0131b71882c872f0ae
parent 474808 60bf0ae446ce30b797a928d8f7961aadb00662b4
child 474810 93a5044fd831621054e4aea7c1a65396e1b7ffae
push id36046
push useraiakab@mozilla.com
push dateTue, 21 May 2019 21:45:52 +0000
treeherdermozilla-central@257f2c96cef5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgrins
bugs1551320
milestone69.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 1551320 - Replace one more createElement with createElementNS. r=bgrins Differential Revision: https://phabricator.services.mozilla.com/D31918
toolkit/mozapps/extensions/content/aboutaddonsCommon.js
--- a/toolkit/mozapps/extensions/content/aboutaddonsCommon.js
+++ b/toolkit/mozapps/extensions/content/aboutaddonsCommon.js
@@ -6,16 +6,18 @@
 "use strict";
 
 /* exported attachUpdateHandler, getBrowserElement, loadReleaseNotes,
  * openOptionsInTab */
 
 var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 var {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
+const HTML_NS = "http://www.w3.org/1999/xhtml";
+
 XPCOMUtils.defineLazyPreferenceGetter(
   this, "WEBEXT_PERMISSION_PROMPTS",
   "extensions.webextPermissionPrompts", false);
 
 ChromeUtils.defineModuleGetter(this, "Extension",
                                "resource://gre/modules/Extension.jsm");
 
 function getBrowserElement() {
@@ -80,17 +82,17 @@ async function loadReleaseNotes(uri) {
   const ParserUtils = Cc["@mozilla.org/parserutils;1"]
     .getService(Ci.nsIParserUtils);
   const flags =
     ParserUtils.SanitizerDropMedia |
     ParserUtils.SanitizerDropNonCSSPresentation |
     ParserUtils.SanitizerDropForms;
 
   // Sanitize and parse the content to a fragment.
-  const context = document.createElement("div");
+  const context = document.createElementNS(HTML_NS, "div");
   return ParserUtils.parseFragment(text, flags, false, uri, context);
 }
 
 function openOptionsInTab(optionsURL) {
   let mainWindow = window.windowRoot.ownerGlobal;
   if ("switchToTabHavingURI" in mainWindow) {
     mainWindow.switchToTabHavingURI(optionsURL, true, {
       relatedToCurrent: true,