diff options
| author | XhmikosR <[email protected]> | 2020-04-28 22:17:43 +0300 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2020-05-07 20:53:21 +0300 |
| commit | 2bd3bd842d5ec67078a42f3d09ad240fa596979a (patch) | |
| tree | f050db767ff3c0889cf7440f1e599cc94a1400ba /site/layouts/_default/examples.html | |
| parent | 737b6925ab64b431d47b24ed1bb3c450143872d1 (diff) | |
| download | bootstrap-2bd3bd842d5ec67078a42f3d09ad240fa596979a.tar.xz bootstrap-2bd3bd842d5ec67078a42f3d09ad240fa596979a.zip | |
Use `safeHTMLAttr` in the `integrity` attributes.
Diffstat (limited to 'site/layouts/_default/examples.html')
| -rw-r--r-- | site/layouts/_default/examples.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/site/layouts/_default/examples.html b/site/layouts/_default/examples.html index 6142e29ad..3fe1ac9bd 100644 --- a/site/layouts/_default/examples.html +++ b/site/layouts/_default/examples.html @@ -44,13 +44,13 @@ {{ if ne .Page.Params.include_js false -}} {{- if eq hugo.Environment "production" -}} - <script src="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.min.js" integrity="{{ .Site.Params.cdn.js_bundle_hash }}" crossorigin="anonymous"></script> + <script src="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.min.js" {{ printf "integrity=%q" .Site.Params.cdn.js_bundle_hash | safeHTMLAttr }} crossorigin="anonymous"></script> {{- else -}} <script src="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.js"></script> {{- end }} {{ range .Page.Params.extra_js -}} - <script{{ with .async }} async{{ end }} src="{{ .src }}"{{ with .integrity }} integrity="{{ . }}" crossorigin="anonymous"{{ end }}></script> + <script{{ with .async }} async{{ end }} src="{{ .src }}"{{ with .integrity }} {{ printf "integrity=%q" . | safeHTMLAttr }} crossorigin="anonymous"{{ end }}></script> {{- end -}} {{- end }} </body> |
