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
The above code generates -> https://fonts.googleapis.com/css?family=Space+Mono:400,700 instead of https://fonts.googleapis.com/css?family=Space+Mono:400,700. You can see that + is replaced by +, but when I use safeHTML, I have no such problem.
The title essentially says the same thing. What's confusing me is that you say that it doesn't escape + in a template, but then you say that it generates +. I consider that to be escaped.
In any case, I don't think this is a bug. I suspect that you are not using the safeURL function properly. Please search the discussion forums for how to use safeURL properly. If you don't find the answer you need, open a new thread in the forums.
In template
safeURL
function doesn't escape+
character. Example:Consider the following settings under
config.toml
:I am then trying to use this in an HTML template as:
<!-- baseOf.html --> {{ .Site.Params.fontFamilyURL | safeURL }}
The above code generates ->
https://fonts.googleapis.com/css?family=Space+Mono:400,700
instead ofhttps://fonts.googleapis.com/css?family=Space+Mono:400,700
. You can see that+
is replaced by+
, but when I usesafeHTML
, I have no such problem.The issue is something similar to #5236.
I am using
Hugo Static Site Generator v0.49/extended windows/amd64 BuildDate: unknown
The text was updated successfully, but these errors were encountered: