]> git.wh0rd.org Git - tt-rss.git/commitdiff
parser: use node->c14n() instead of expecting html in nodeValue
authorAndrew Dolgov <noreply@fakecake.org>
Fri, 22 Jan 2016 22:04:24 +0000 (01:04 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Fri, 22 Jan 2016 22:04:24 +0000 (01:04 +0300)
classes/feeditem/atom.php
classes/feeditem/rss.php

index dfac7149f6cb4981cd6d768dd36e3600b80dd438..7990a61c985dff0fac4d1ef160a8cd9a7aeed356 100644 (file)
@@ -75,7 +75,7 @@ class FeedItem_Atom extends FeedItem_Common {
                                }
                        }
 
-                       return $content->nodeValue;
+                       return $content->c14n();
                }
        }
 
@@ -95,7 +95,7 @@ class FeedItem_Atom extends FeedItem_Common {
                                }
                        }
 
-                       return $content->nodeValue;
+                       return $content->c14n();
                }
 
        }
index 27a364b812b90bb708b09b7f24d2e0803e06c40a..95f3acdebb5dbb2df9aba9837139bb2ffe2b6f38 100644 (file)
@@ -71,17 +71,16 @@ class FeedItem_RSS extends FeedItem_Common {
                $contentB = $this->elem->getElementsByTagName("description")->item(0);
 
                if ($contentA && !$contentB) {
-                       return $contentA->nodeValue;
+                       return $contentA->c14n();
                }
 
-
                if ($contentB && !$contentA) {
-                       return $contentB->nodeValue;
+                       return $contentB->c14n();
                }
 
                if ($contentA && $contentB) {
                        return mb_strlen($contentA->nodeValue) > mb_strlen($contentB->nodeValue) ?
-                               $contentA->nodeValue : $contentB->nodeValue;
+                               $contentA->c14n() : $contentB->c14n();
                }
        }
 
@@ -89,7 +88,7 @@ class FeedItem_RSS extends FeedItem_Common {
                $summary = $this->elem->getElementsByTagName("description")->item(0);
 
                if ($summary) {
-                       return $summary->nodeValue;
+                       return $summary->c14n();
                }
        }