Skip to content

Commit ac326d2

Browse files
committed
pipe $attr into safeHTMLAttr in js.html partial
1 parent 2f3c22e commit ac326d2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

layouts/partials/js.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
{{- $processed = $processed | minify -}}
1212
{{- $attr := "defer" -}}
1313
{{- if strings.HasSuffix . ".sync.js" }}
14-
{{- $attr = "" -}}
14+
{{- $attr = "" -}}
1515
{{- else if strings.HasSuffix . ".async.js" }}
16-
{{- $attr = "async" -}}
16+
{{- $attr = "async" -}}
1717
{{- end -}}
18-
<script src="{{ $processed.Permalink }}" {{ $attr }}></script>
18+
<script src="{{ $processed.Permalink }}" {{ $attr | safeHTMLAttr }}></script>
1919
{{- end -}}

0 commit comments

Comments
 (0)