Revert "Replace `innerHTML` with `textContent`"
This reverts commit 101b8d05a0ce0592b13c5ffcc7486bf45ec69045.
Reason for revert: find owners actually rely on `innerHTML` for lots of its content
Change-Id: I28b96b934c7ca3c2201b49e9d981cbd8dc1c79a6
diff --git a/src/main/resources/static/find-owners.js b/src/main/resources/static/find-owners.js
index 440ffbb..c6f2826 100644
--- a/src/main/resources/static/find-owners.js
+++ b/src/main/resources/static/find-owners.js
@@ -230,7 +230,7 @@
}
function strElement(s) {
var e = document.createElement('span');
- e.textContent = s;
+ e.innerHTML = s;
return e;
}
function br() {
@@ -338,7 +338,7 @@
div.style.display = 'none';
return;
}
- div.textContent = '';
+ div.innerHTML = '';
div.style.display = 'inline';
div.appendChild(strElement(title));
function addOwner(itemDiv, ownerEmail) {
@@ -393,7 +393,7 @@
div.lastElementChild.style.paddingBottom = '0.5em';
}
function addOwnersDiv(div, title) {
- div.textContent = '';
+ div.innerHTML = '';
div.style.display = 'inline';
div.appendChild(strElement(title));
function compareOwnerInfo(o1, o2) {
@@ -425,7 +425,7 @@
// Add message to header div and make visible.
let headerMessageDiv = document.createElement('div');
- headerMessageDiv.textContent = isExemptedFromOwnerApproval() ? HTML_IS_EXEMPTED :
+ headerMessageDiv.innerHTML = isExemptedFromOwnerApproval() ? HTML_IS_EXEMPTED :
((onSubmit ? HTML_ONSUBMIT_HEADER : '') + HTML_SELECT_REVIEWERS);
header.appendChild(headerMessageDiv);
header.style.display = 'inline';