]> git.wh0rd.org Git - tt-rss.git/commitdiff
magpie, simplepie: add (experimental) patches for broken libxml
authorAndrew Dolgov <fox@madoka.spb.ru>
Mon, 1 Dec 2008 05:23:01 +0000 (06:23 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Mon, 1 Dec 2008 05:23:01 +0000 (06:23 +0100)
magpierss/rss_parse.inc
simplepie/simplepie.inc

index 3aff57a50c925647bc8fe62b203207bc7fdd70be..011048310ec27c86515ea928abf283ef1c5b6080 100644 (file)
@@ -159,6 +159,10 @@ class MagpieRSS {
                 'feed_start_element', 'feed_end_element' );
                         
         xml_set_character_data_handler( $this->parser, 'feed_cdata' ); 
+
+       $source=str_replace("&lt;","&#60;",$source);
+       $source=str_replace("&gt;","&#62;",$source);
+       $source=str_replace("&amp;","&#38;",$source);
     
         $status = xml_parse( $this->parser, $source );
 
index 65c32abe6a4eb50ef86c95e15a2bd49ca30a0a0e..cc3987c0877fe85428b80872883ee73b7673cfd2 100644 (file)
@@ -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("&lt;","&#60;",$data);
+               $data=str_replace("&gt;","&#62;",$data);
+               $data=str_replace("&amp;","&#38;",$data);
+
                // Parse!
                if (!xml_parse($xml, $data, true))
                {