Describe the bug
When an enclosure URL contains an unescaped & character, the generated RSS or Atom feed becomes invalid XML.
For example, this output:
<enclosure url="https://example.com/hello&world.png" />
s not well-formed XML because & must be escaped as &.
This causes some feed readers or validators to fail when parsing the feed.
To Reproduce
Steps to reproduce the behavior:
- Create a feed item with an enclosure whose URL includes an & in its query string.
- Generate the feed.
- Open the XML in a validator or RSS reader.
- Observe that parsing fails due to invalid XML syntax.
Expected behavior
The feed generator should escape unsafe characters in URLs, producing well-formed XML.
For example:
<enclosure url="https://example.com/hello&world.png" />
Actual behavior
The generated XML includes the raw & character in the enclosure URL, resulting in invalid XML output.
Versions (please complete the following information):
Additional context
I plan to submit a pull request to fix this issue.
Describe the bug
When an enclosure URL contains an unescaped & character, the generated RSS or Atom feed becomes invalid XML.
For example, this output:
s not well-formed XML because & must be escaped as &.
This causes some feed readers or validators to fail when parsing the feed.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The feed generator should escape unsafe characters in URLs, producing well-formed XML.
For example:
Actual behavior
The generated XML includes the raw
&character in the enclosure URL, resulting in invalid XML output.Versions (please complete the following information):
Additional context
I plan to submit a pull request to fix this issue.