The generated atom.xml contains Control Characters which prevents the atom.xml from being recognised correctly
axl411 opened this issue · comments
I'm using hexo 3.2.0 and hexo-generator-feed 1.1.0.
I get an error opening the generated atom.xml: error on line 41 at column 428: PCDATA invalid Char value 16
I find that most characters whose char value is less than 32(decimal) is a Control Character and should not be put in the atom.xml, see this and this. The most useful info from here is:
When you put utf-8 encoded strings in a XML document you should remember that not all utf-8 valid > chars are accepted in a XML document http://www.w3.org/TR/REC-xml/#charsets
So you should strip away the unwanted chars, else you’ll have an XML fatal parsing error
So I suppose if those characters can be removed from atom.xml when we generate it, I will no longer get the error.
By the way, this issue should be caused by the same reason.
Did you try an unstable version of hexo-generator-feed? I think this PR should solve your issue.
I can see your PR is added on Mar 26, but the latest release of hexo-generator-feed (1.1.0) is on Feb 6, so your code is not in the latest release...
Now the new version is released, this issue is confirmed to be resolved.