I am currently trying to dynamically generate Javascript using a Scala object in my Play application, like so:
<script type="text/javascript">@JavascriptGenerator.generateChangingTextScript()</script>
This Javascript contains characters that Play wants to escape automatically, such as a quote ("). It automatically turns it into:
"String goes here"
rather than the desired:
"String goes here"
The Javascript being returned does not like this, and as such does not work. How do I tell Play to not do this?
Thanks.
The Play 2 equivalent to Play 1’s ${"<".raw}
is @Html("<")
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With