Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
634d574e
Commit
634d574e
authored
Oct 12, 2021
by
Axel García
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly sanitize OneTrust id
parent
bc54c517
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
app/views/layouts/_one_trust.html.haml
app/views/layouts/_one_trust.html.haml
+4
-2
No files found.
app/views/layouts/_one_trust.html.haml
View file @
634d574e
-
if
one_trust_enabled?
-
one_trust_id
=
sanitize
(
extra_config
.
one_trust_id
,
scrubber:
Rails
::
Html
::
TextOnlyScrubber
.
new
)
<!-- OneTrust -->
=
javascript_include_tag
"https://cdn.cookielaw.org/consent/
#{
extra_config
.
one_trust_id
}
/OtAutoBlock.js"
=
javascript_include_tag
"https://cdn.cookielaw.org/consent/
#{
one_trust_id
}
/OtAutoBlock.js"
=
javascript_tag
nonce:
content_security_policy_nonce
do
:plain
const oneTrustScript = document.createElement('script');
oneTrustScript.src = 'https://cdn.cookielaw.org/scripttemplates/otSDKStub.js';
oneTrustScript.dataset.domainScript = '
#{
extra_config
.
one_trust_id
}
';
oneTrustScript.dataset.domainScript = '
#{
one_trust_id
}
';
oneTrustScript.nonce = '
#{
content_security_policy_nonce
}
'
oneTrustScript.charset = 'UTF-8';
oneTrustScript.defer = true;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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