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)
1181
1181
return $ entity ;
1182
1182
}
1183
1183
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 );
1191
1186
1192
1187
$ this ->parseError ('Expected &ENTITY;, got &ENTITY%s (no trailing ;) ' , $ tok );
1193
1188
1194
- return '& ' . $ entity ;
1189
+ return '& ' ;
1195
1190
}
1196
1191
}
Original file line number Diff line number Diff line change @@ -480,4 +480,13 @@ public function testCDATA()
480
480
$ res = $ this ->cycleFragment ('a<![CDATA[ This <is> a test. ]]>b ' );
481
481
$ this ->assertRegExp ('|<!\[CDATA\[ This <is> a test\. \]\]>| ' , $ res );
482
482
}
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
+ }
483
492
}
You can’t perform that action at this time.
0 commit comments