isaacs / sax-js

A sax style parser for JS
Other
1.09k stars 325 forks source link

Processing instruction ending with "?" fails to parse #233

Open arista opened 6 years ago

arista commented 6 years ago

This is a legal XML construct:

<?Is this legal XML??>

But the parser gets tripped up by the ?? at the end - it doesn't treat the final ?> as the end of the PI, but instead keeps adding to the PI body until it either reaches the end of the file, or the ending ?> of the next PI.