Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rssfilter produces invalid XML (unescaped &) #39

Open
dechamps opened this issue May 25, 2024 · 0 comments
Open

rssfilter produces invalid XML (unescaped &) #39

dechamps opened this issue May 25, 2024 · 0 comments

Comments

@dechamps
Copy link

If I run https://rssfilter.netlify.app/ on https://www.legislation.gov.uk/new/uksi/data.feed (regardless of filters), the resulting feed is not valid XML, preventing it from being used in RSS readers.

Since that feed changes over time, I have attached the original feed and its filtered version: https://github.com/bcongdon/rssfilter/files/15442737/uksi-rssfilter.zip

The errors are all variations of:

$ xmllint uksi-data-rssfilter.xml
uksi-data-rssfilter.xml:8: parser error : xmlParseEntityRef: no name
 Value="CORONERS, ENGLAND"></leg:heading><leg:heading Value="CORONERS, ENGLAND &
                                                                               ^
uksi-data-rssfilter.xml:8: parser error : xmlParseEntityRef: no name
CRIMINAL LAW, ENGLAND"></leg:heading><leg:heading Value="CRIMINAL LAW, ENGLAND &
                                                                               ^
uksi-data-rssfilter.xml:8: parser error : xmlParseEntityRef: no name
heading><leg:heading Value="CUSTOMS"></leg:heading><leg:heading Value="CUSTOMS &
                                                                               ^
…

And indeed, & characters are properly escaped in the input feed:

<leg:heading Value="CORONERS, ENGLAND &amp; WALES"/>

But they are not in the filtered feed:

<leg:heading Value="CORONERS, ENGLAND & WALES">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant