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

Allow use tag in SVG again #3524

Merged
merged 2 commits into from
Feb 27, 2025
Merged

Allow use tag in SVG again #3524

merged 2 commits into from
Feb 27, 2025

Conversation

thomasdax98
Copy link
Member

@thomasdax98 thomasdax98 commented Feb 27, 2025

Description

Allow use tag in SVG again

use can be used to define paths once in a SVG and then integrating them multiple times via anchor links: <use xlink:href="#path-id" />. This should not be prohibited.

Banning use caused problems for one of our clients when uploading SVGs because they use the pattern described above.

It's still not possible to use use to reference external files, since we still prohibit href and xlink:href attributes starting with http://, https:// and javascript:.


Also fix a typing problem that lead to a type error in useDamFileUpload. This caused no error message to show up in the Admin when uploading a bad SVG. Instead, the upload progress bar was shown forever.

Acceptance criteria

Screenshots/screencasts

Before:

Bildschirmaufnahme.2025-02-27.um.09.31.03.mov

Now:

Bildschirmaufnahme.2025-02-27.um.09.30.39.mov

Further information

@thomasdax98 thomasdax98 merged commit 83b8111 into main Feb 27, 2025
11 checks passed
@thomasdax98 thomasdax98 deleted the loosen-svg-validation branch February 27, 2025 09:16
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.

2 participants