I ran into the following issue when authoring a partial. I’m using:
{{ dict "a" 1 "b" 2 | jsonify }}
This results in
{"a":1,"b":2}
which is perfectly valid.
Now I want to use the same expression inside <script> tags:
<script onload='myfunc({{ dict "a" 1 "b" 2 | jsonify }});'</script>
This results in
<script onload='myfunc("{\"a\":1,\"b\":2}");'</script>
Notation " is unwanted in this case, I want " instead. I don’t know how to achieve that, I tried with safeJS, to no avail.
Any help is appreciated here.
