magpie, simplepie: add (experimental) patches for broken libxml

This commit is contained in:
Andrew Dolgov 2008-12-01 06:23:01 +01:00
parent c9d16c3ad2
commit 7cc1e4aed8
2 changed files with 8 additions and 0 deletions

View File

@ -160,6 +160,10 @@ class MagpieRSS {
xml_set_character_data_handler( $this->parser, 'feed_cdata' ); xml_set_character_data_handler( $this->parser, 'feed_cdata' );
$source=str_replace("<","<",$source);
$source=str_replace(">",">",$source);
$source=str_replace("&","&",$source);
$status = xml_parse( $this->parser, $source ); $status = xml_parse( $this->parser, $source );
# try to force convert everything to UTF-8 and parse again # try to force convert everything to UTF-8 and parse again

View File

@ -12761,6 +12761,10 @@ class SimplePie_Parser
xml_set_character_data_handler($xml, 'cdata'); xml_set_character_data_handler($xml, 'cdata');
xml_set_element_handler($xml, 'tag_open', 'tag_close'); xml_set_element_handler($xml, 'tag_open', 'tag_close');
$data=str_replace("<","<",$data);
$data=str_replace(">",">",$data);
$data=str_replace("&","&",$data);
// Parse! // Parse!
if (!xml_parse($xml, $data, true)) if (!xml_parse($xml, $data, true))
{ {