Skip to content

Commit

Permalink
[HtmlSanitizer] Consider width attribute as safe
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-anne committed Oct 27, 2023
1 parent 947492c commit 45e5a24
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Reference/W3CReference.php
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,
];
}
4 changes: 2 additions & 2 deletions Tests/HtmlSanitizerAllTest.php
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 45e5a24

Please sign in to comment.