Edit includes/rss_parser.php
Find
Code: Select all
// Determine encoding from xml
if (!preg_match('/encoding=["\'](.*?)["\']/', $xml, $match))
{
if (empty($recode))
{
$this->error_msg = sprintf($user->lang['NO_ENCODINGS'], $url);
return false;
}
// Try to add the XML tag if missing encoding info
$xml = preg_replace('#<\?xml\s(?:[^>]*)\?>#is', '<?xml version="1.0" encoding="' . $recode . '"?>', $xml);
}
// override source encoding
if (!empty($recode))
{
$xml = str_replace($match[1], $recode, $xml);
$encoding = $recode;
}
else
{
$encoding = strtolower($match[1]);
}
Code: Select all
// Determine encoding from xml
if (!preg_match('/encoding=["\'](.*?)["\']/', $xml, $match))
{
if (empty($recode))
{
$this->error_msg = sprintf($user->lang['NO_ENCODINGS'], $url);
return false;
}
// Patch xml header with $recode
$xml = preg_replace('#<\?xml\s(?:[^>]*)\?>#is', '<?xml version="1.0" encoding="' . $recode . '"?>', $xml);
$encoding = $recode;
}
else
{
// override source encoding
if (!empty($recode))
{
// Patch xml header with $recode
$xml = str_replace($match[1], $recode, $xml);
$encoding = $recode;
}
else
{
$encoding = strtolower($match[1]);
}
}