0
HTML comment within <script> tags
Are HTML comments within script tags ignored? Or does commented out code not run? For example: <script> <!-- window.onload = alert('test'); --> </script>
2 Respuestas
+ 8
It is ignored.
https://code.sololearn.com/W53RVkVh544O/?ref=app
+ 1
Thanks. I've seen it being used on a website but it seemed to be done as a form of code obfuscation. It used
unescape('long string of characters');
I assume it's to prevent web scraping maybe.