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

[4.x] Ability to disable SVG sanitization on upload #9839

Merged
merged 4 commits into from
Apr 8, 2024

Conversation

duncanmcclean
Copy link
Member

@duncanmcclean duncanmcclean commented Apr 8, 2024

This pull request makes it possible to disable the sanitization of SVG files when uploading to Statamic, which was introduced in #9365.

Most of the time, you'll want to keep SVG sanitization disabled. However, if you need to upload SVGs with dynamic portions and you trust your users (including those on the frontend if you're using form uploads), then this PR would allow for that:

// config/statamic/assets.php

'svg_sanitization_on_upload' => false,

Ref support ticket: 5342

Copy link
Member

@jasonvarga jasonvarga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get rid of the double negative.

Make the config option svg_sanitization and default it to true.

@duncanmcclean duncanmcclean requested a review from jasonvarga April 8, 2024 14:16
@jasonvarga jasonvarga merged commit 73db351 into 4.x Apr 8, 2024
36 checks passed
@jasonvarga jasonvarga deleted the ability-to-disable-svg-sanitization branch April 8, 2024 14:53
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