Check for single quotes too

This commit is contained in:
Frederic Guillot 2013-04-01 21:31:54 -04:00
parent 8e59668b84
commit 93ce3e170a
1 changed files with 6 additions and 3 deletions

View File

@ -71,15 +71,18 @@ class Reader
return new Atom($this->content);
}
else if (strpos($first_tag, '<rss ') !== false && strpos($first_tag, 'version="2.0"') !== false) {
else if (strpos($first_tag, '<rss ') !== false &&
(strpos($first_tag, 'version="2.0"') !== false || strpos($first_tag, 'version=\'2.0\'') !== false)) {
return new Rss20($this->content);
}
else if (strpos($first_tag, '<rss ') !== false && strpos($first_tag, 'version="0.92"') !== false) {
else if (strpos($first_tag, '<rss ') !== false &&
(strpos($first_tag, 'version="0.92"') !== false || strpos($first_tag, 'version=\'0.92\'') !== false)) {
return new Rss92($this->content);
}
else if (strpos($first_tag, '<rss ') !== false && strpos($first_tag, 'version="0.91"') !== false) {
else if (strpos($first_tag, '<rss ') !== false &&
(strpos($first_tag, 'version="0.91"') !== false || strpos($first_tag, 'version=\'0.91\'') !== false)) {
return new Rss91($this->content);
}