You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using values in a html template, my colleague faced a problem that the values in <script> tags are all escaped. So the template developer can not use the values in javascript. It just looks like this:
// ... <script type="text/json" id="channel" ch="recommend" tk=""> ["news","comedy","cartoon","tech","travelling","fashion","photograph","household","movies","foods","military","health","test"] </script> // ... I tried to find out the reason. So I copied the template values in other HTML tags rather than in <script>. It rendered correctly, and was not escaped:
// ...
https://h1z3y3.me/posts/go-html-template-script-unescape/
While using values in a html template, my colleague faced a problem that the values in <script> tags are all escaped. So the template developer can not use the values in javascript. It just looks like this:
// ... <script type="text/json" id="channel" ch="recommend" tk=""> ["news","comedy","cartoon","tech","travelling","fashion","photograph","household","movies","foods","military","health","test"] </script> // ... I tried to find out the reason. So I copied the template values in other HTML tags rather than in <script>. It rendered correctly, and was not escaped:
// ...
The text was updated successfully, but these errors were encountered: