Revert "parser: use node->c14n() instead of expecting html in nodeValue"

This reverts commit 1383514ad9.
This commit is contained in:
Andrew Dolgov 2016-01-23 01:24:13 +03:00
parent 1383514ad9
commit d2bb392bae
2 changed files with 7 additions and 6 deletions

View file

@ -75,7 +75,7 @@ class FeedItem_Atom extends FeedItem_Common {
} }
} }
return $content->c14n(); return $content->nodeValue;
} }
} }
@ -95,7 +95,7 @@ class FeedItem_Atom extends FeedItem_Common {
} }
} }
return $content->c14n(); return $content->nodeValue;
} }
} }

View file

@ -71,16 +71,17 @@ class FeedItem_RSS extends FeedItem_Common {
$contentB = $this->elem->getElementsByTagName("description")->item(0); $contentB = $this->elem->getElementsByTagName("description")->item(0);
if ($contentA && !$contentB) { if ($contentA && !$contentB) {
return $contentA->c14n(); return $contentA->nodeValue;
} }
if ($contentB && !$contentA) { if ($contentB && !$contentA) {
return $contentB->c14n(); return $contentB->nodeValue;
} }
if ($contentA && $contentB) { if ($contentA && $contentB) {
return mb_strlen($contentA->nodeValue) > mb_strlen($contentB->nodeValue) ? return mb_strlen($contentA->nodeValue) > mb_strlen($contentB->nodeValue) ?
$contentA->c14n() : $contentB->c14n(); $contentA->nodeValue : $contentB->nodeValue;
} }
} }
@ -88,7 +89,7 @@ class FeedItem_RSS extends FeedItem_Common {
$summary = $this->elem->getElementsByTagName("description")->item(0); $summary = $this->elem->getElementsByTagName("description")->item(0);
if ($summary) { if ($summary) {
return $summary->c14n(); return $summary->nodeValue;
} }
} }