-
Notifications
You must be signed in to change notification settings - Fork 52
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
Text is not escaped on write #32
Comments
Quick-xml doesn't handle escaping characters when writing. Shouldn't be too complicated to add. |
Should this be reported upstream to quickxml or is this something that should be added for this 'rss' crate? |
This should probably be better on quick-xml. Unfortunately I don't have much time at the moment. |
What would be involved in fixing this? Would it just require escaping |
Thanks! |
56: update to quick-xml 0.9.0 r=frewsxcv I've just updated quick-xml to use v0.9.0. This version includes a PR to escape some characters on Text events: tafia/quick-xml#78 This may close #32
When producing XML, text on any field is written unescaped, which in practice means any feed with HTML content will be broken.
Example:
The final roundtrip parse fails due to a literal
<feed>
that was written.Looking into the quick-xml crate, I couldn't find it clearly stated anywhere, but from the source code,
Event::Text
is meant to hold only escaped content. (This is still true on quick-xml 0.6, where a number of things changed compared to 0.4.)The text was updated successfully, but these errors were encountered: