Skip to content

Commit 3686622

Browse files
committed
fixed encoding of template text
Signed-off-by: Eddie Knight <knight@linux.com>
1 parent f60108e commit 3686622

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd/generate-plugin.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,9 @@ func generateFileFromTemplate(data CatalogData, templatePath, OutputDir string)
128128
}
129129

130130
tmpl, err := template.New("plugin").Funcs(template.FuncMap{
131-
"clean_spaces": func(s string) string {
132-
return strings.TrimSpace(strings.ReplaceAll(s, "\n", " "))
131+
"as_text": func(s string) template.HTML {
132+
s = strings.TrimSpace(strings.ReplaceAll(s, "\n", " "))
133+
return template.HTML(s)
133134
},
134135
"as_id": func(s string) string {
135136
return strings.TrimSpace(

0 commit comments

Comments
 (0)