Pattern: Unsafe assignment to innerHTML
or outerHTML
Issue: -
This error message suggests that you are using an unsafe coding
pattern. Please do not simply assign variables to innertHTML
,
as this might cause Cross-Site Scripting (XSS) vulnerabilities.
We encourage you to construct DOM nodes using createElement
and changing their attributes (e.g., textContent
, classList
) instead.