Skip to content

Commit 976c1ef

Browse files
committed
Fix broken category and tag links
Since Hugo 0.120.0 the output of `delimit` is now deHTMLized. For example, it turns '<a>' into '&lt;a&gt;' in the final output. `delimit` is used to create lists of categories and tags in the blog posts summary, so it affects these lists, breaking HTML links in them. We can bring it back to working HTML by piping it to the `safeHTML` function. This commit does that.
1 parent 794cae7 commit 976c1ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

layouts/partials/blog-taxonomy-info.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{{ $sort := sort . }}
44
{{ $links := apply $sort "partial" "post-category-link" "." }}
55
{{ $clean := apply $links "chomp" "." }}
6-
{{ delimit $clean ", " }}
6+
{{ delimit $clean ", " | safeHTML }}
77
</span>
88
{{ end }}
99

@@ -12,6 +12,6 @@
1212
{{ $sort := sort . }}
1313
{{ $links := apply $sort "partial" "post-tag-link" "." }}
1414
{{ $clean := apply $links "chomp" "." }}
15-
{{ delimit $clean ", " }}
15+
{{ delimit $clean ", " | safeHTML }}
1616
</span>
1717
{{ end }}

0 commit comments

Comments
 (0)