如何在JavaScript块中的HTML模板中禁用转义URL /字符串

I've tried to render a url as string, URL, JS and HTML. In all the cases this:

 <script>
  var someUrl = "{{ .myUrl }}";
 </script>

gets rendered to this value:

https:\/\/some_domain123.com\/path1\/path2\/path3

No matter what.

I want this:

https://some_domain123.com/path1/path2/path3

What actually works?

https:\/\/some_domain123.com\/path1\/path2\/path3 is the same as https://some_domain123.com/path1/path2/path3 in JavaScript.

So, it actually works.

As @mkopriva commented, remove the double quotes around {{ .myURL }}, and it works as you want.

See it on the Playground