Open weotch opened 8 years ago
From the HAML docs:
Currently, filters ignore the :escape_html option. This means that #{} interpolation within filters is never HTML-escaped.
Currently, in MtHaml, this...
:php $code = "var msg='hi';"; :javascript #{$code}
Results in:
<script type="text/javascript"> //<![CDATA[ var msg='hi'; //]]> </script>
It should be:
<script type="text/javascript"> //<![CDATA[ var msg='hi'; //]]> </script>
As a workaround, you can do:
:php $code = "var msg='hi';"; %script(type="text/javascript") :plain // Other JS code :php echo $code; :plain // More JS code
From the HAML docs:
Currently, in MtHaml, this...
Results in:
It should be: