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.

CommentFileSizeAuthor
#1 aggregator-6.x-ampersand.patch547 bytesAlexisWilke

Comments

AlexisWilke’s picture

StatusFileSize
new547 bytes

As 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

AlexisWilke’s picture

Everyone, 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 &.

damien tournoud’s picture

Status: Active » Closed (duplicate)