When parsing an RSS feed from a 5.7 site, the other site produced unescaped '&' which made the parser break.
I fixed this by adding this quick hack to aggregator.module on line 711 (before the line $xml_parser = drupal_xml_parser_create($data);)
$data=str_replace(' & ', ' & ', $data);
I know this isn't really a proper solution, but I think the parser should be a little more tolerant.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | aggregator-6.x-ampersand.patch | 547 bytes | AlexisWilke |
Comments
Comment #1
AlexisWilke commentedAs I'm at it, I'll put my patch here too. See here #350667: Feed parsing breaks (XML_ERR_NAME_REQUIRED)
Thank you.
Alexis Wilke
Comment #2
AlexisWilke commentedEveryone, I have a new patch to fix the aggregator...
More info & patch in #350667: Feed parsing breaks (XML_ERR_NAME_REQUIRED).
As you will notice, it makes use the XML rules 4, 4a and 5 to check the validity of the entities. If not valid, we replace the ampersand by &.
Comment #3
damien tournoud commentedThis is a duplicate of #350667: Feed parsing breaks (XML_ERR_NAME_REQUIRED).