innerHTML
)
The
HTML5 spec
states that script tags inserted via
innerHTML
will not be executed.
$.html()
)
jQuery DOM methods strip and
eval()
any script tags passed in, exposing an XSS vulnerability.
$.text()
)
This method treats the passed string as a textNode, preventing it from being executed by the browser.