diff options
author | Piloto do Raio 2 do Centro de Detenção Provisória de Pinheiros (CDP III) cela 308 <98627927+m4l4v1t4@users.noreply.github.com> | 2022-07-04 05:42:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-04 05:42:39 +0300 |
commit | 82eacb5582f2468b7596622a50253a944a7b8d38 (patch) | |
tree | b95dcc96d2ebd3210dfbf3e10badce1359c54d54 | |
parent | 829f6816d4b82f5aa02b5740ec7899a746a99dfe (diff) |
from `htmlEscape` to `safeHTML` on attr. `title`
The attribute `title` of HTML elements **cannot render HTML tags**. Then, the correct is to use safeHTML rather then htmlEscape.
This way we can use HTML tag on `caption` (`featureImageCap`) without rendering escaped HTML (like `<cite>`) on `title` `figure` tag attribute.
-rw-r--r-- | layouts/partials/figure.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/figure.html b/layouts/partials/figure.html index 4a0f7b1..e5b7afc 100644 --- a/layouts/partials/figure.html +++ b/layouts/partials/figure.html @@ -60,7 +60,7 @@ src="{{ $fileWeb }}" {{ end }} {{ with $cap }} - title="{{ htmlEscape $cap }}" + title="{{ safeHTML $cap }}" {{ end }} /> |