Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/chipzoller/hugo-clarity.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiloto 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
committerGitHub <noreply@github.com>2022-07-04 05:42:39 +0300
commit82eacb5582f2468b7596622a50253a944a7b8d38 (patch)
treeb95dcc96d2ebd3210dfbf3e10badce1359c54d54
parent829f6816d4b82f5aa02b5740ec7899a746a99dfe (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 `&lt;cite&gt;`) on `title` `figure` tag attribute.
-rw-r--r--layouts/partials/figure.html2
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 }}
/>