From: Andrew Dolgov Date: Mon, 1 Dec 2008 05:23:01 +0000 (+0100) Subject: magpie, simplepie: add (experimental) patches for broken libxml X-Git-Tag: 1.2.30~24 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=7cc1e4aed841c4ef3c197deaa3eb9844bce62c5d;p=tt-rss.git magpie, simplepie: add (experimental) patches for broken libxml --- diff --git a/magpierss/rss_parse.inc b/magpierss/rss_parse.inc index 3aff57a5..01104831 100644 --- a/magpierss/rss_parse.inc +++ b/magpierss/rss_parse.inc @@ -159,6 +159,10 @@ class MagpieRSS { 'feed_start_element', 'feed_end_element' ); 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 ); diff --git a/simplepie/simplepie.inc b/simplepie/simplepie.inc index 65c32abe..cc3987c0 100644 --- a/simplepie/simplepie.inc +++ b/simplepie/simplepie.inc @@ -12761,6 +12761,10 @@ class SimplePie_Parser xml_set_character_data_handler($xml, 'cdata'); xml_set_element_handler($xml, 'tag_open', 'tag_close'); + $data=str_replace("<","<",$data); + $data=str_replace(">",">",$data); + $data=str_replace("&","&",$data); + // Parse! if (!xml_parse($xml, $data, true)) {