Repository navigation
Fix: avoid innerHTML to prevent CSP violations in Video Filters - #4375
Merged
ImprovedTube2 merged 2 commits intoOct 10, 2026
Merged
ImprovedTube2 merged 2 commits into
ImprovedTube2 merged 2 commits into
Conversation
Contributor
|
Thank you for the quick fix! However, I found a couple of new issues:
Could you please look into these issues when you have time? |
Contributor
Author
Yes sure |
Collaborator
Contributor
|
Thank you @abhijeetnardele24-hash for being ready to look into this! The follow-up issues have been addressed in #4376 |
Collaborator
|
Merged #4376 as of @hkzo's review. Merging #4375 with no changes for now. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4374
This PR resolves the TrustedHTML / CSP violations that were causing the Video Filters feature (introduced in #4112) to fail on YouTube.
Changes:
innerHTMLstring assignment inappearance.jswith standard DOM API methods (document.createElementNS,setAttribute, etc.) when building the SVG<filter>and its<feConvolveMatrix>/<feComponentTransfer>children.Tested and verified that presets (e.g. Vivid) now correctly apply the filters to the video player without throwing console errors.