Bug 1267514 - Fix about:neterror generic fallback text when there is no available title/description for the error. r=Gijs a=lizzard
authorNihanth Subramanya <nhnt11@gmail.com>
Tue, 03 May 2016 16:12:32 -0700
changeset 334852 689961723fc8f0b7954c7c33dfc99d6a30ce3cfa
parent 334851 2dee0c9ad1fb90afeb5c4fa63ddc672088f460fb
child 334853 96622c844cdaf613297ed44b436671b50ae567d3
push id1146
push userCallek@gmail.com
push dateMon, 25 Jul 2016 16:35:44 +0000
treeherdermozilla-release@a55778f9cd5a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs, lizzard
bugs1267514
milestone48.0a2
Bug 1267514 - Fix about:neterror generic fallback text when there is no available title/description for the error. r=Gijs a=lizzard MozReview-Commit-ID: 4no91xMhDYQ
browser/base/content/aboutNetError.xhtml
--- a/browser/base/content/aboutNetError.xhtml
+++ b/browser/base/content/aboutNetError.xhtml
@@ -212,25 +212,25 @@
 
       function initPage()
       {
         var err = getErrorCode();
         gIsCertError = (err == "nssBadCert");
 
         // if it's an unknown error or there's no title or description
         // defined, get the generic message
-        var errTitle = document.getElementById("et_" + err).innerHTML;
-        var errDesc  = document.getElementById("ed_" + err).innerHTML;
+        var errTitle = document.getElementById("et_" + err);
+        var errDesc  = document.getElementById("ed_" + err);
         if (!errTitle || !errDesc)
         {
-          errTitle = document.getElementById("et_generic").innerHTML;
-          errDesc  = document.getElementById("ed_generic").innerHTML;
+          errTitle = document.getElementById("et_generic");
+          errDesc  = document.getElementById("ed_generic");
         }
 
-        document.querySelector(".title-text").innerHTML = errTitle;
+        document.querySelector(".title-text").innerHTML = errTitle.innerHTML;
 
         var sd = document.getElementById("errorShortDescText");
         if (sd) {
           if (gIsCertError) {
             sd.innerHTML = document.getElementById("ed_nssBadCert").innerHTML;
           }
           else {
             sd.textContent = getDescription();
@@ -239,17 +239,17 @@
         if (gIsCertError) {
           initPageCertError();
           return;
         }
 
         var ld = document.getElementById("errorLongDesc");
         if (ld)
         {
-          ld.innerHTML = errDesc;
+          ld.innerHTML = errDesc.innerHTML;
         }
 
         if (err == "sslv3Used") {
           document.getElementById("learnMoreContainer").style.display = "block";
           var learnMoreLink = document.getElementById("learnMoreLink");
           learnMoreLink.href = "https://support.mozilla.org/kb/how-resolve-sslv3-error-messages-firefox";
           document.body.className = "certerror";
         }