Skip to content

Feat/uepr 238 sanitize svgs on open #251

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

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

KManolov3
Copy link
Contributor

Resolves

https://scratchfoundation.atlassian.net/browse/UEPR-238

Proposed Changes

Reuse SVG sanitization logic for opening SVGs

Reason for Changes

Currently we load SVGs directly into the DOM, without extensive sanitization. We do use DOMPurify, but it doesn't catch all places where a link might be attached/loaded. We already have more extensive logic in sanitizeSvgText, used on costume upload, which we can reuse for loading already uploaded svgs as well.

@KManolov3 KManolov3 requested a review from a team as a code owner May 19, 2025 12:00
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.

1 participant