Replaces innerHtml
with innerText
, which is safer in most cases.
See the OWASP DOM XSS cheatsheet.
Apply with the Grit CLI
grit apply inner_html_to_inner_text
Transforms innerHtml to innerText
BEFORE
x.innerHtml = 'foo';
AFTER
x.innerText = 'foo';