Is there a way to prevent xss while using innerHTML?
One example:
elem.innerHTML = "Hello <span style='color:red'>There!</span><img src=x onerror=confirm('xss') />");
there can be many more scenarios like this where we just want to show the Pure view part only in the above case only
Hello <span style='color:red'>There!</span><img src=x />