Skip to content

[HtmlSanitizer] Allow null for sanitizer option allowed_link_hosts and allowed_media_hosts #46849

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

Merged
merged 1 commit into from
Jul 29, 2022

Conversation

plfort
Copy link
Contributor

@plfort plfort commented Jul 4, 2022

Q A
Branch? 6.1
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #46647
License MIT
Doc PR

I set allowed_link_hosts an allowed_media_hosts default value to null instead of an empty array, this introduces a breaking change.
We can keep the current behavior by setting defaultValue([]) in Configuration.php but I don't know how to set the default value to an empty array and set it to null manually in XML configuration.

Need your help 😅

@carsonbot carsonbot added this to the 6.1 milestone Jul 4, 2022
@OskarStark OskarStark changed the title [HtmlSanitizer] Allow null for sanitizer option 'allowed_link_hosts' and 'allowed_media_hosts' [HtmlSanitizer] Allow null for sanitizer option allowed_link_hosts and allowed_media_hosts Jul 5, 2022
@plfort plfort changed the title [HtmlSanitizer] Allow null for sanitizer option allowed_link_hosts and allowed_media_hosts [FrameworkBundle][HtmlSanitizer] Allow null for sanitizer option allowed_link_hosts and allowed_media_hosts Jul 8, 2022
@nicolas-grekas nicolas-grekas requested a review from tgalopin July 11, 2022 06:20
@carsonbot carsonbot changed the title [FrameworkBundle][HtmlSanitizer] Allow null for sanitizer option allowed_link_hosts and allowed_media_hosts [HtmlSanitizer] Allow null for sanitizer option allowed_link_hosts and allowed_media_hosts Jul 28, 2022
@nicolas-grekas nicolas-grekas force-pushed the htmlsanitizer_allowurls_config branch from 3d2dd9e to d3780c5 Compare July 29, 2022 06:42
@nicolas-grekas
Copy link
Member

Thank you @plfort.

@nicolas-grekas nicolas-grekas merged commit aea1a47 into symfony:6.1 Jul 29, 2022
@fabpot fabpot mentioned this pull request Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants