Skip to content

Commit

Permalink
minor #52324 [HtmlSanitizer] Consider width attribute as safe (cedr…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
fabpot committed Oct 27, 2023
2 parents 798a36a + 827bd6a commit b691eba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ final class W3CReference
'vlink' => false,
'vspace' => true,
'webkitdirectory' => true,
'width' => false,
'width' => true,
'wrap' => true,
];
}
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,8 @@ public static function provideSanitizeBody()
'<hr />',
],
[
'<img src="/img/example.jpg" alt="Image alternative text" title="Image title">',
'<img src="/img/example.jpg" alt="Image alternative text" title="Image title" />',
'<img src="/img/example.jpg" alt="Image alternative text" title="Image title" height="150" width="300">',
'<img src="/img/example.jpg" alt="Image alternative text" title="Image title" height="150" width="300" />',
],
[
'<img src="http://trusted.com/img/example.jpg" alt="Image alternative text" title="Image title" />',
Expand Down

0 comments on commit b691eba

Please sign in to comment.