File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -748,6 +748,7 @@ protected function parseTag(): array
748748 }
749749
750750 $ this ->content ->skipByToken ('blank ' );
751+ $ tag = strtolower ($ tag );
751752 if ($ this ->content ->char () == '/ ' ) {
752753 // self closing tag
753754 $ node ->getTag ()->selfClosing ();
Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ protected function clear(): void
201201 $ this ->text = null ;
202202 $ this ->textWithChildren = null ;
203203
204- if (is_null ($ this ->parent ) === false ) {
204+ if (! is_null ($ this ->parent )) {
205205 $ this ->parent ->clear ();
206206 }
207207 }
Original file line number Diff line number Diff line change @@ -53,4 +53,14 @@ public function testConfigStrictMissingAttribute()
5353 $ this ->assertEquals ("Tag 'p' has an attribute 'block' with out a value! (character #22) " , $ e ->getMessage ());
5454 }
5555 }
56+
57+ public function testConfigStrictBRTag ()
58+ {
59+ $ dom = new Dom ;
60+ $ dom ->setOptions ([
61+ 'strict ' => true ,
62+ ]);
63+ $ dom ->load ('<br /> ' );
64+ $ this ->assertTrue (true );
65+ }
5666}
You can’t perform that action at this time.
0 commit comments