bug 1190: properly handle entities
authorMichael Tänzer <neo@nhng.de>
Mon, 15 Jul 2013 16:40:22 +0000 (18:40 +0200)
committerMichael Tänzer <neo@nhng.de>
Mon, 15 Jul 2013 16:40:22 +0000 (18:40 +0200)
Signed-off-by: Michael Tänzer <neo@nhng.de>
pages/index/0.php

index 79a677d..805b147 100644 (file)
@@ -44,7 +44,7 @@
        foreach($items as $id => $item) {
                $query = "./title";
                $nodeList = $xpath->query($query, $item);
-               $title = str_replace("&amp;#", "&#", recode_string("UTF8..html" , $nodeList->item(0)->nodeValue));
+               $title = recode_string("UTF8..html" , $nodeList->item(0)->nodeValue);
 
                $query = "./link";
                $nodeList = $xpath->query($query, $item);
@@ -52,7 +52,7 @@
 
                $query = "./description";
                $nodeList = $xpath->query($query, $item);
-               $description = str_replace("&amp;#", "&#", recode_string("UTF8..html" , $nodeList->item(0)->nodeValue));
+               $description = recode_string("UTF8..html" , $nodeList->item(0)->nodeValue);
 
                printf('<h3> %s </h3>\n', $title);
                printf('<p> %s </p>\n', $description);