Skip to content

Commit 2975518

Browse files
authored
Merge pull request #15 from Kdecherf/impr/source-srcset
Add testcase for srcset attribute in source tag
2 parents da043c2 + 2ea2167 commit 2975518

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/HTMLawedTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,12 @@ public function testImgSrcsetAttribute($input, $expectedOutput = null)
3434

3535
$this->assertSame($expectedOutput ?: $input, $output);
3636
}
37+
38+
public function testPictureBlocks()
39+
{
40+
$input = '<div><picture><source srcset="a.jpg, c.jpg 405w" /><img src="z.jpg" alt="image" /></picture></div>';
41+
42+
$output = htmLawed($input);
43+
$this->assertSame($input, $output);
44+
}
3745
}

0 commit comments

Comments
 (0)