Skip to content

Commit

Permalink
Fix unsafe innerHTML assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
Maarrk committed Mar 2, 2021
1 parent 1727678 commit 7d84e5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion localize.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ let messagesTemplate = ''
document.querySelectorAll('[data-i18n-msg]').forEach((node) => {
let message = browser.i18n.getMessage(node.dataset.i18nMsg)
if (message.length > 0) {
node.innerHTML = message
node.textContent = message
} else {
messagesTemplate += `,
Expand Down

0 comments on commit 7d84e5b

Please sign in to comment.