Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Added test + fix for XML stylesheet declaration #15

Closed
wants to merge 3 commits into from

Conversation

redders6600
Copy link

Currently this parsing fails when it encounters an xml feed which has an xml-stylesheet tag like the following:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet title="XSL_formatting" type="text/xsl" href="/shared/bsp/xsl/rss/nolsol.xsl"?>

The BBC news rss feed is an example.

I've written a test which fails without the changes, and implemented a fix that basically removes any content enclosed by <? ?> that immediately follows the declaration.

Ed Hinchliffe added 3 commits August 12, 2015 19:19
 - properly escaped the ?
 - made the . match lazy for safety
 - removed capturing group
mk-pmb added a commit to mk-pmb/xml-parser-fix-pmb that referenced this pull request Aug 28, 2016
Added test + fix for XML stylesheet declaration [segmentio#15 imported]
@mk-pmb
Copy link

mk-pmb commented Aug 28, 2016

Thanks for fixing!

@mk-pmb
Copy link

mk-pmb commented Aug 28, 2016

Have I missed something when mergeing? It still cannot parse jQuery.ajax.xml.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants