Answer the question
In order to leave comments, you need to log in
Why does HTMLPurifier work this way?
I installed the HTMLPurifier template for Kohana, trying to filter the text (with the default HTMLPurifier settings):
<script type="text/javascript">
<!--
alert('1');
-->
</script>
<script type="text/javascript"><!--//--><![CDATA[//><!--
alert('1');
//--><!]]></script>
Но этот код успешно выполняется в браузере, почему так?
Может есть пример настроек HTMLPurifier для Kohana ?
Answer the question
In order to leave comments, you need to log in
Why did you put HTML comments into JS?
Everything is simpler, even if you write in the html tag <script> </script>
, it's still javascript, and you need to comment it as if you were commenting the js file.
That is NOT
<script type="text/javascript">
<!--
alert('1');
-->
</script>
<script type="text/javascript">
//alert('1');
</script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question