Bug 785549 - Use textContent instead of innerHTML to set domain and credits in reader view. r=Gijs, a=sledru
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Mon, 13 Apr 2015 14:18:16 -0700
changeset 258528 38e095acde46
parent 258527 7e31d76c4d7b
child 258529 899ee022ed4c
push id4690
push userryanvm@gmail.com
push date2015-04-20 16:04 +0000
treeherdermozilla-beta@eb5e2063637b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs, sledru
bugs785549
milestone38.0
Bug 785549 - Use textContent instead of innerHTML to set domain and credits in reader view. r=Gijs, a=sledru
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,