Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
2bd3bd84
Commit
2bd3bd84
authored
4 years ago
by
XhmikosR
Browse files
Options
Download
Email Patches
Plain Diff
Use `safeHTMLAttr` in the `integrity` attributes.
parent
737b6925
1 merge request
!31948
Examples/Floating-labels: fix bad behavior with autofill
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
site/layouts/_default/examples.html
+2
-2
site/layouts/_default/examples.html
site/layouts/partials/home/masthead-followup.html
+4
-4
site/layouts/partials/home/masthead-followup.html
site/layouts/partials/scripts.html
+1
-1
site/layouts/partials/scripts.html
site/layouts/partials/stylesheet.html
+1
-1
site/layouts/partials/stylesheet.html
with
8 additions
and
8 deletions
+8
-8
site/layouts/_default/examples.html
+
2
-
2
View file @
2bd3bd84
...
...
@@ -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>
...
...
This diff is collapsed.
Click to expand it.
site/layouts/partials/home/masthead-followup.html
+
4
-
4
View file @
2bd3bd84
...
...
@@ -26,11 +26,11 @@
<a
class=
"btn btn-lg btn-outline-primary mb-4"
href=
"/docs/{{ .Site.Params.docs_version }}/getting-started/introduction/"
>
Explore the docs
</a>
<div
class=
"text-left mx-md-5 px-md-5"
>
<h5>
CSS only
</h5>
{{ highlight (printf (`
<link
rel=
"stylesheet"
href=
"%s"
integrity=
"%s"
crossorigin=
"anonymous"
>
`) .Site.Params.cdn.css .Site.Params.cdn.css_hash) "html" "" }}
{{ highlight (printf (`
<link
rel=
"stylesheet"
href=
"%s"
integrity=
%q
crossorigin=
"anonymous"
>
`) .Site.Params.cdn.css
(
.Site.Params.cdn.css_hash
| safeHTMLAttr)
) "html" "" }}
<h5>
JS and Popper.js
</h5>
{{ highlight (printf (`
<script
src=
"%s"
integrity=
"%s"
crossorigin=
"anonymous"
></script>
<script
src=
"%s"
integrity=
"%s"
crossorigin=
"anonymous"
></script>
`) .Site.Params.cdn.popper .Site.Params.cdn.popper_hash .Site.Params.cdn.js .Site.Params.cdn.js_hash) "html" "" }}
{{ highlight (printf (`
<script
src=
"%s"
integrity=
%q
crossorigin=
"anonymous"
></script>
<script
src=
"%s"
integrity=
%q
crossorigin=
"anonymous"
></script>
`) .Site.Params.cdn.popper
(
.Site.Params.cdn.popper_hash
| safeHTMLAttr)
.Site.Params.cdn.js
(
.Site.Params.cdn.js_hash
| safeHTMLAttr)
) "html" "" }}
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
site/layouts/partials/scripts.html
+
1
-
1
View file @
2bd3bd84
{{ 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 }}
...
...
This diff is collapsed.
Click to expand it.
site/layouts/partials/stylesheet.html
+
1
-
1
View file @
2bd3bd84
{{- "
<!-- Bootstrap core CSS -->
" | safeHTML }}
{{ if eq hugo.Environment "production" -}}
<link
href=
"/docs/{{ .Site.Params.docs_version }}/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"{{
.Site.Params.cdn.css_hash }}
"
crossorigin=
"anonymous"
>
<link
href=
"/docs/{{ .Site.Params.docs_version }}/dist/css/bootstrap.min.css"
rel=
"stylesheet"
{{
printf
"
integrity=
%q"
.
Site.Params.cdn.css_hash
|
safeHTMLAttr
}}
crossorigin=
"anonymous"
>
{{- else -}}
<link
href=
"/docs/{{ .Site.Params.docs_version }}/dist/css/bootstrap.css"
rel=
"stylesheet"
>
{{- end }}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets