Skip to content

Commit

Permalink
Merge pull request #15 from Kdecherf/impr/source-srcset
Browse files Browse the repository at this point in the history
Add testcase for srcset attribute in source tag
  • Loading branch information
Kdecherf authored Jul 22, 2023
2 parents da043c2 + 2ea2167 commit 2975518
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/HTMLawedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,12 @@ public function testImgSrcsetAttribute($input, $expectedOutput = null)

$this->assertSame($expectedOutput ?: $input, $output);
}

public function testPictureBlocks()
{
$input = '<div><picture><source srcset="a.jpg, c.jpg 405w" /><img src="z.jpg" alt="image" /></picture></div>';

$output = htmLawed($input);
$this->assertSame($input, $output);
}
}

0 comments on commit 2975518

Please sign in to comment.