From f965ee33c5bd330bc1d52c05d74344cb74813557 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 16 May 2007 06:14:20 +0100 Subject: [PATCH] add magpie ampersand fix as per forum thread #740 --- magpierss/rss_parse.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/magpierss/rss_parse.inc b/magpierss/rss_parse.inc index 56d420f0..f0558ac8 100644 --- a/magpierss/rss_parse.inc +++ b/magpierss/rss_parse.inc @@ -121,7 +121,9 @@ class MagpieRSS { xml_set_object( $this->parser, $this ); xml_set_element_handler($this->parser, 'feed_start_element', 'feed_end_element' ); - + + $source = preg_replace("/&(?!amp;)/","&",$source); + xml_set_character_data_handler( $this->parser, 'feed_cdata' ); $status = xml_parse( $this->parser, $source ); -- 2.39.5