Hi!
I need to send some data from the front matter to a html
data-attribute
, but its content is being encoded:
<body data-controller="Dashboard" data-action="index%20account" id="" class="">
The data-action
value should be index account
.
I tried to use | safeHTMLAttr
, | safeHTML
and safeJS
. No luck.
<body data-controller="{{ .Params.controller | default ($.Scratch.Get "controller") }}" data-action="{{ .Params.action | default ($.Scratch.Get "action") | default "" | safeHTMLAttr }}" id="{{ .Params.id | default ($.Scratch.Get "id") }}" class="{{ .Params.class | default ($.Scratch.Get "class") }}">
Does anybody have any idea?
Thank you!