Bug 785549 - Use textContent instead of innerHTML to set domain and credits in reader view. r=Gijs
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Mon, 13 Apr 2015 14:18:16 -0700
changeset 270500 225457512400f8056f87b474890582c68770257d
parent 270499 a490eda23996f14aabb0571d87cbf92dd56846d2
child 270501 ce046fd1be02d0ad9f154d4402167434afa2a962
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs785549
milestone40.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 785549 - Use textContent instead of innerHTML to set domain and credits in reader view. r=Gijs
toolkit/components/reader/AboutReader.jsm
--- a/toolkit/components/reader/AboutReader.jsm
+++ b/toolkit/components/reader/AboutReader.jsm
@@ -730,19 +730,18 @@ AboutReader.prototype = {
 
   _showContent: function Reader_showContent(article) {
     this._messageElement.style.display = "none";
 
     this._article = article;
 
     this._domainElement.href = article.url;
     let articleUri = Services.io.newURI(article.url, null, null);
-    this._domainElement.innerHTML = this._stripHost(articleUri.host);
-
-    this._creditsElement.innerHTML = article.byline;
+    this._domainElement.textContent = this._stripHost(articleUri.host);
+    this._creditsElement.textContent = article.byline;
 
     this._titleElement.textContent = article.title;
     this._doc.title = article.title;
 
     this._headerElement.style.display = "block";
 
     let parserUtils = Cc["@mozilla.org/parserutils;1"].getService(Ci.nsIParserUtils);
     let contentFragment = parserUtils.parseFragment(article.content,