Bug fix for RSS2 detection

This commit is contained in:
Frédéric Guillot 2013-12-15 22:38:06 -05:00
parent 282c1cb5ad
commit fab7b8b04b

View File

@ -461,9 +461,19 @@ class Filter
public static function stripXmlTag($data)
{
if (strpos($data, '<?xml ') !== false) {
$data = substr($data, strrpos($data, '?>') + 2);
$data = ltrim(substr($data, strpos($data, '?>') + 2));
}
do {
$pos = strpos($data, '<?xml-stylesheet ');
if ($pos !== false) {
$data = ltrim(substr($data, strpos($data, '?>') + 2));
}
} while ($pos !== false && $pos < 200);
return $data;
}