You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "safe" configuration for HtmlSanitizer (using (new HtmlSanitizerConfig())->allowSafeElements() allows the height attribute, but blocks the width attribute. IMHO, both should be allowed, or both should be blocked.
…ic-anne)
This PR was merged into the 6.3 branch.
Discussion
----------
[HtmlSanitizer] Consider `width` attribute as safe
| Q | A
| ------------- | ---
| Branch? | 6.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fix#50153
| License | MIT
Consider the HTML attribute `width` to be safe, as attribute `height` already is.
Commits
-------
827bd6a [HtmlSanitizer] Consider `width` attribute as safe
Symfony version(s) affected
6.2.7
Description
The "safe" configuration for
HtmlSanitizer
(using(new HtmlSanitizerConfig())->allowSafeElements()
allows theheight
attribute, but blocks thewidth
attribute. IMHO, both should be allowed, or both should be blocked.https://github.com/symfony/html-sanitizer/blob/eae9b0a9ad7a2ed1963f819547d59ff99ad9e0fd/Reference/W3CReference.php#L274
https://github.com/symfony/html-sanitizer/blob/eae9b0a9ad7a2ed1963f819547d59ff99ad9e0fd/Reference/W3CReference.php#L397
How to reproduce
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: