I get the following rendered wit a configurable URL used in a partial:
window.cookieconsent_options = {"message":"This website uses cookies.","dismiss":"Got it!","learnMore":"More info","link":"http:\/\/localhost:1313\/cookie-information\/","theme":"dark-top"};
As you can see the forward slashed in the URL get quoted by backslashes and I can’t figure out why this happens.
I define a parameter in config.toml:
`[params]
Set the “more info” URL in this parameter. You have to
provide a document page for this URL - see the example website
cookie_consent_info_url = “/cookie-information/”
`
In the base document (baseof.html) - at the moment located at layouts/_default to override the one from the theme - I do the following:
{{ if .Site.Params.cookie_consent_info_url }} {{ partial "cookie_consent.html" . }} {{ end }}
In layouts/partials/cookie_consent.html - at the moment not overriding anything in the theme - I have the following:
Go templates are context sensitive and escape under certain circumstances your variables. Have a look at the safeJS template function to mark your injected variables as save.
{{ end }}
{{ end }}
`
The only obvious difference for me is that the one partial is in my layouts folder and the other (working one) in the layout folder of the theme. But moving my partial to the theme doesn't help with the problem.