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
Output from expand_urls causes invalid Atom feeds #198
Comments
Interesting. What do you think is the best fix here? |
How about wrapping all content in CDATA tags instead of escaping them by hand? Also, the I'm using code blocks in my feed and it's validated correctly. |
The CDATA solution could be better, but we need to be aware that CDATA doesn't nest, so we need to escape CDATA-end-tags ( |
We should add this CDATA end tag to the xml_escape perhaps. |
@fhemberger or @mikl think you can manage a pull request for this? It sounds like you guys have a better idea on this than I do. |
@imathis Aye, I'll have a look later on ... |
In
atom.xml
, the following line is used to escape and output the content:However, the output from expand_urls is not escaped, so if you have a code block in your code, you will get something like this:
ie. with escaped and unescaped HTML mixed together.
As the spec for text type decrees, an element with
type="html"
must only contain escaped HTML. It is also allowed to set `type="xhtml" and then have unescaped markup instead, but then the whole thing must be unescaped and valid XHTML.So, long story short, using code blocks or similar tags yields invalid Atom feeds.
The text was updated successfully, but these errors were encountered: