-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
Description
Describe the bug
There is this single line of inline script that prevent a strict CSP from working:
<script>document.getElementById('searchbox').style.display = "block"</script> |
sphinx/sphinx/themes/basic/searchbox.html
Line 12 in eaebbec
<script>document.getElementById('searchbox').style.display = "block"</script> |
Currently this cause the searchbox to not appear if a strict Content-Security-Policy is being used. It seems like it would be relatively easy to fix and pass more rigours security audits.
How to Reproduce
Any built-in sphinx template would have this (tested with classic and albatros)
Environment Information
Sphinx==8.2.3
Sphinx extensions
---
Additional context
There seems to be an old issue #3620 where CSP was resolved but this case may have been missed.