Inline script from remote file wrapped in quotation marks

I am trying to inline some code from a remote file, but when I wrap the code in <script></script> tag, the code is wrapped with open and closing quotation marks which makes it not to work. Any way to resolve this? Here’s some test code

{{ $script := resources.GetRemote "https://gist.githubusercontent.com/DavidKuennen/443121e692175d6fc145e1efb0284ec9/raw/9af9727fc7eee75c97e16722a03534e0f1f7f27f/minimal-analytics-snippet.js" }}
<script>{{ $script.Content }}</script>

safeJS

Do make sure actually trust the remote JavaScript though. The requirement to use safeJS rather than just allowing any JavaScript by default is a safety measure.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.