Bug 1346797 - Fix calendar eslint issues - "Fix" no-unsanitized/property issues. r=MakeMyDay
authoreslint <eslint@bugzilla.kewis.ch>
Sat, 07 Oct 2017 17:09:27 +0200
changeset 22310 d038bfb4ca16ef6933e61af18b71dd322d2f42ae
parent 22309 96bcae4b9bbcc33ce8fab8210152087c08c9e862
child 22311 34e4b127cd103fd8ef7752b9e89cdf24529deb73
push id13598
push usermozilla@jorgk.com
push dateSun, 08 Oct 2017 20:54:24 +0000
treeherdercomm-central@86066f04ca11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMakeMyDay
bugs1346797
Bug 1346797 - Fix calendar eslint issues - "Fix" no-unsanitized/property issues. r=MakeMyDay MozReview-Commit-ID: HDo96MGoKsC
calendar/base/content/dialogs/calendar-print-dialog.js
calendar/lightning/modules/ltnInvitationUtils.jsm
--- a/calendar/base/content/dialogs/calendar-print-dialog.js
+++ b/calendar/base/content/dialogs/calendar-print-dialog.js
@@ -232,16 +232,17 @@ function refreshHtml(finishFunc) {
             } finally {
                 convStream.close();
             }
         } catch (e) {
             Components.utils.reportError("Calendar print dialog:refreshHtml: " + e);
         }
 
         let iframeDoc = document.getElementById("content").contentDocument;
+        // eslint-disable-next-line no-unsanitized/property
         iframeDoc.documentElement.innerHTML = html;
         iframeDoc.title = settings.title;
 
         if (finishFunc) {
             finishFunc();
         }
     }
 );
--- a/calendar/lightning/modules/ltnInvitationUtils.jsm
+++ b/calendar/lightning/modules/ltnInvitationUtils.jsm
@@ -105,20 +105,22 @@ ltn.invitation = {
                     // we convert special characters first to not mix up html conversion
                     let mode = Components.interfaces.mozITXTToHTMLConv.kEntities;
                     let contentText = linkConverter.scanTXT(aContentText, mode);
                     try {
                         // kGlyphSubstitution may lead to unexpected results when used in scanHTML
                         mode = Components.interfaces.mozITXTToHTMLConv.kStructPhrase +
                                Components.interfaces.mozITXTToHTMLConv.kGlyphSubstitution +
                                Components.interfaces.mozITXTToHTMLConv.kURLs;
+                        // eslint-disable-next-line no-unsanitized/property
                         content.innerHTML = linkConverter.scanHTML(contentText, mode);
                     } catch (e) {
                         mode = Components.interfaces.mozITXTToHTMLConv.kStructPhrase +
                                Components.interfaces.mozITXTToHTMLConv.kURLs;
+                        // eslint-disable-next-line no-unsanitized/property
                         content.innerHTML = linkConverter.scanHTML(contentText, mode);
                     }
                 } else {
                     content.textContent = aContentText;
                 }
             }
         };