Skip to content
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 inline scripts from scraped articles #2111

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

audiodude
Copy link
Member

Fixes #2096

Simply find and remove all script tags from scraped HTML when rendering the article. This doesn't affect "module dependencies", because they are calculated before and re-added later.

@audiodude audiodude requested a review from Jaifroid December 5, 2024 01:30
Copy link

codecov bot commented Dec 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.26%. Comparing base (ee070cf) to head (7276d45).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2111      +/-   ##
==========================================
- Coverage   75.36%   75.26%   -0.11%     
==========================================
  Files          41       41              
  Lines        3195     3198       +3     
  Branches      706      706              
==========================================
- Hits         2408     2407       -1     
- Misses        670      674       +4     
  Partials      117      117              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kelson42 kelson42 force-pushed the remove-inline-script branch from e8aef14 to 7276d45 Compare December 10, 2024 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

REGRESSION: Remove new inline JS from ZIMs produced by dev (at least 1.14.0) to comply with restrictive CSPs
1 participant