Why is setInterval not safe from XSS?
问题 I'm going through OWASP Cross Site Scripting Prevent Cheat Sheet. In rule #3 it says: Please note there are some JavaScript functions that can never safely use untrusted data as input - EVEN IF JAVASCRIPT ESCAPED! <script> window.setInterval('...EVEN IF YOU ESCAPE UNTRUSTED DATA YOU ARE XSSED HERE...'); </script> To clarify: I know that using setInterval et al. is safe with your own content. I know that one must validate, escape and/or sanitise external content. My understanding is that rule