Bug 1267514 - Fix about:neterror generic fallback text when there is no available title/description for the error. r=Gijs
authorNihanth Subramanya <nhnt11@gmail.com>
Tue, 03 May 2016 16:12:32 -0700
changeset 321087 9428c76cb9df77442a54cd68cae5a8426ba334a7
parent 321086 335e95e6cdc528b60638b2a9802071f8143fe854
child 321088 83823a99114c095f1771d9a6b9c7d735dfe25abe
push id9671
push userraliiev@mozilla.com
push dateMon, 06 Jun 2016 20:27:52 +0000
treeherdermozilla-aurora@cea65ca3d0bd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1267514
milestone49.0a1
Bug 1267514 - Fix about:neterror generic fallback text when there is no available title/description for the error. r=Gijs 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";
         }