Open spysir opened 1 year ago
Did the content contain quotation marks? If so, you need to escape them by using the escapes functions such as {{ .Content | html }}
or {{ .Content | js }}
or {{ .Content | urlquery }}
(see: https://pkg.go.dev/text/template#hdr-Functions)
A better option in this case would be to filter .Content
with {{.Content | printf "%q"}}
as this will produce a quoted string with all encapsulated quotes properly escaped.
It didn't work !