magpie, simplepie: add (experimental) patches for broken libxml
This commit is contained in:
parent
c9d16c3ad2
commit
7cc1e4aed8
|
@ -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
|
||||||
|
|
|
@ -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))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue