Sightly Javascript
Hello,
We have a requirement where authors should be able to input javascript code from the dialog and it should render as is within HTL.
We provided a textarea for the same and in sightly have used ${properties.javascriptcode@ context='scriptString'} to render
This however upon render shows output similar to the following -
<script>\r\nfunction myFunction() {\r\n var str = \x22The best things in life are free\x22;\r\n var patt = new RegExp(\x22e\x22);\r\n var res = patt.test(str);\r\n document.getElementById(\x22demo\x22).innerHTML = res;\r\n}\r\n<\/script>
Is there a way to unescape these characters for scripts to render properly.Looking forward to your response.
Thanks.