Skip to content

Commit dd9fd7a

Browse files
committed
Do not escape HTML in html_br template function
1 parent 93acf9d commit dd9fd7a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

templates/functions.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ func containsStringFunc(list []string, element, yes, no string) string {
8585
}
8686

8787
func htmlBrFunc(text string) string {
88-
text = template.HTMLEscapeString(text)
89-
return strings.Replace(text, "\n", "<br>", -1)
88+
return strings.ReplaceAll(text, "\n", "<br>")
9089
}
9190

9291
func mapFunc(values ...interface{}) (map[string]interface{}, error) {

0 commit comments

Comments
 (0)