input/onmouseover="javaSCRIPT:confirm(1)" < sVg><scRipt %00>alert(1
<meta http-equiv="refresh" content="0;url=javascript:confirm(1)"> <iframe src=javascript:alert(document.location&rpar
Тег <script> служит для встраивания в HTML фрагментов, написанных на других языках. На сегодняшний день в 99% случаев это Javascript. Скрипт начинается сразу после открывающего тега <script> и заканчивается сразу перед закрывающим тегом </script>.
<script type=”text/javascript”> tag is used to define client side script which uses attribute type for specifying MIME type. confirm(“Click a button”) line displays confirm box with ok and cancel button.
In this scenario, the script tag needs to be included as part of a string, but the browser may interpret it as actual code and execute it, leading to unexpected behavior or errors. In this question, we will explore different methods for properly escaping a script tag in a JavaScript variable.
payload = <script>alert(1)</script>.
Однако на практике браузеры заканчивают разбор блока сценариев CDATA на фактическом теге </script> close. В XHTML такой специальной обработки для блоков сценариев нет, поэтому любой символ < (или &) внутри них должен быть &escaped;, как в любом другом элементе.
<script type="text/javascript">
Unescaping HTML in a string does the reverse of what we have done above, by replacing: < with <.