-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove usage of inline styles & inline scripts #305
Comments
I will work on this, I was planning to resolve it within that PR, but it would be messed up, I will raise different PR for this. |
@lb- I dig bit and found many times inline css is being used in wagtail: https://github.com/search?q=repo%3Awagtail%2Fwagtail+%22style%22+language%3AHTML&type=code&p=1 If they are necessary to clean up for CSP, I would like to remove them all with proper test if the changes are not breaking anything (it will take long time). |
@ayaan-qadri there's already a Wagtail (core) issue to cover CSP items, feel free to do an assessment / suggestion for changes on those issues. wagtail/wagtail#1288 & wagtail/wagtail#7053 As for this issue (the one in the Sphinx Wagtail theme), maybe let's just get a PR up that updates other usage and ignores the Note that this work is low priority but smaller / focused PRs are welcome in this repo or the Wagtail one if you want to support these efforts. |
It would good to remove our usage of inline styles and move these to the CSS or find a better way to achieve the same result.
This would allow projects to enable CSP for their docs if they want. It also aligns with the direction of Wagtail core - wagtail/wagtail#1288
theme files
sphinx-wagtail-theme/sphinx_wagtail_theme/extensions.html
Line 19 in ebfbb71
sphinx-wagtail-theme/docs/_templates/layout.html
Line 227 in ebfbb71
domainindex.html
I'm not sure what this file is for but maybe we need to check if we can change it or if it's used.
Note. We should really provide a better
alt
here also or just usealt=""
if it's presentation only.sphinx-wagtail-theme/sphinx_wagtail_theme/domainindex.html
Line 43 in ebfbb71
Find a way to avoid inline scripts here. Maybe by setting this global in an existing JS file we already load.
sphinx-wagtail-theme/sphinx_wagtail_theme/domainindex.html
Lines 15 to 17 in ebfbb71
Originally posted by @ayaan-qadri in #304 (comment)
The text was updated successfully, but these errors were encountered: