Skip to content

Commit

Permalink
Implemented Test Cases for image urls with multiple properties groupe…
Browse files Browse the repository at this point in the history
…d together and absolute URLs.
  • Loading branch information
narenin authored Oct 4, 2024
1 parent 558e397 commit 4b26e5c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/phpunit/tests/kses.php
Original file line number Diff line number Diff line change
Expand Up @@ -1369,6 +1369,16 @@ public function data_safecss_filter_attr() {
'css' => 'background: url("/sites/2/2023/10/image.jpg?width=1024&height=600")',
'expected' => 'background: url("/sites/2/2023/10/image.jpg?width=1024&height=600")',
),
// Background image with Absolute URLs.
array(
'css' => 'background: url("https://wordpress.org/files/2024/07/6-6-whats-new-i1.png?resize=300%2C211&ssl=1")',
'expected' => 'background: url("https://wordpress.org/files/2024/07/6-6-whats-new-i1.png?resize=300%2C211&ssl=1")',
),
// Background image with multiple properties grouped together.
array(
'css' => 'background: url("https://example.com/uploads/sites/2/2023/10/image.jpg?width=1024&height=600")',
'expected' => 'background: url("https://example.com/uploads/sites/2/2023/10/image.jpg?width=1024&height=600")',
),
// Background-image with valid entities.
array(
'css' => 'background-image:url("/sites/2/2023/10/some%20%21%40-_+-&image.jpg?foo=some%20%21%40-_+thing&width=1024&height=600")',
Expand Down

0 comments on commit 4b26e5c

Please sign in to comment.