File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed
Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -1181,16 +1181,11 @@ protected function decodeCharacterReference($inAttribute = false)
11811181 return $ entity ;
11821182 }
11831183
1184- // If in an attribute, then failing to match ; means unconsume the
1185- // entire string. Otherwise, failure to match is an error.
1186- if ($ inAttribute ) {
1187- $ this ->scanner ->unconsume ($ this ->scanner ->position () - $ start );
1188-
1189- return '& ' ;
1190- }
1184+ // Failing to match ; means unconsume the entire string.
1185+ $ this ->scanner ->unconsume ($ this ->scanner ->position () - $ start );
11911186
11921187 $ this ->parseError ('Expected &ENTITY;, got &ENTITY%s (no trailing ;) ' , $ tok );
11931188
1194- return '& ' . $ entity ;
1189+ return '& ' ;
11951190 }
11961191}
Original file line number Diff line number Diff line change @@ -480,4 +480,13 @@ public function testCDATA()
480480 $ res = $ this ->cycleFragment ('a<![CDATA[ This <is> a test. ]]>b ' );
481481 $ this ->assertRegExp ('|<!\[CDATA\[ This <is> a test\. \]\]>| ' , $ res );
482482 }
483+
484+ public function testAnchorTargetQueryParam ()
485+ {
486+ $ res = $ this ->cycle ('<a href="https://domain.com/page.php?foo=bar&target=baz">https://domain.com/page.php?foo=bar&target=baz</a> ' );
487+ $ this ->assertContains (
488+ '<a href="https://domain.com/page.php?foo=bar&target=baz">https://domain.com/page.php?foo=bar&target=baz</a> ' ,
489+ $ res
490+ );
491+ }
483492}
You can’t perform that action at this time.
0 commit comments