From 1630af91685a169979c58383820cd13fcb82ef9c Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Tue, 11 Jul 2017 16:27:47 -0400 Subject: [PATCH] Bug 1372509: Fix eslint warnings in about:webrtc. r=jesup --- toolkit/content/aboutwebrtc/aboutWebrtc.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/toolkit/content/aboutwebrtc/aboutWebrtc.js b/toolkit/content/aboutwebrtc/aboutWebrtc.js index c34860b6b04b..001643ad7dc5 100644 --- a/toolkit/content/aboutwebrtc/aboutWebrtc.js +++ b/toolkit/content/aboutwebrtc/aboutWebrtc.js @@ -139,12 +139,13 @@ Control.prototype = { update() { this.ctrl.textContent = this._label; + this.msg.textContent = ""; if (this._message) { - // eslint-disable-next-line no-unsanitized/property - this.msg.innerHTML = - `${this._messageHeader}: ${this._message}`; - } else { - this.msg.innerHTML = null; + this.msg.appendChild(Object.assign(document.createElement("span"), { + className: "info-label", + textContent: `${this._messageHeader}: `, + })); + this.msg.appendChild(document.createTextNode(this._message)); } }, @@ -306,8 +307,7 @@ var AboutWebRTC = { msg.textContent = getString("cannot_retrieve_log"); parent.appendChild(msg); msg = document.createElement("p"); - // eslint-disable-next-line no-unsanitized/property - msg.innerHTML = `${data.error.name}: ${data.error.message}`; + msg.textContent = `${data.error.name}: ${data.error.message}`; parent.appendChild(msg); return; }