File tree Expand file tree Collapse file tree 3 files changed +27
-2
lines changed
Expand file tree Collapse file tree 3 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ class Elements
8383 "area " => 9 , // NORMAL | VOID_TAG
8484 "article " => 81 , // NORMAL | AUTOCLOSE_P | BLOCK_TAG
8585 "aside " => 81 , // NORMAL | AUTOCLOSE_P | BLOCK_TAG
86- "audio " => 65 , // NORMAL | BLOCK_TAG
86+ "audio " => 1 , // NORMAL
8787 "b " => 1 ,
8888 "base " => 9 , // NORMAL | VOID_TAG
8989 "bdi " => 1 ,
Original file line number Diff line number Diff line change @@ -393,7 +393,6 @@ public function testIsA()
393393 'address ' ,
394394 'article ' ,
395395 'aside ' ,
396- 'audio ' ,
397396 'blockquote ' ,
398397 'canvas ' ,
399398 'dd ' ,
Original file line number Diff line number Diff line change @@ -679,4 +679,30 @@ public function testIgnoreSelfClosingTag() {
679679 $ dom = $ this ->parse ($ html );
680680 $ this ->assertSame (1 , $ dom ->getElementsByTagName ('div ' )->item (0 )->childNodes ->length );
681681 }
682+
683+ public function testIAudioInParagraph () {
684+ $ html = <<<EOM
685+ <!DOCTYPE html>
686+ <html>
687+ <head>
688+ <title>testIllegalSelfClosingTag</title>
689+ </head>
690+ <body>
691+ <p>
692+ <audio preload="none" controls="controls">
693+ <source src="https://example.com/test.mp3" type="audio/mpeg" />
694+ Your browser does not support the audio element.
695+ </audio>
696+ </p>
697+ </body>
698+ </html>>
699+ </html>
700+ EOM ;
701+
702+ $ dom = $ this ->parse ($ html );
703+ $ audio = $ dom ->getElementsByTagName ('audio ' )->item (0 );
704+
705+ $ this ->assertSame ('p ' , $ audio ->parentNode ->nodeName );
706+ $ this ->assertSame (3 , $ audio ->childNodes ->length );
707+ }
682708}
You can’t perform that action at this time.
0 commit comments