]> git.mxchange.org Git - friendica.git/commitdiff
Add entry title HTML entities conversion in Protocol\Feed
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 18 Aug 2019 13:37:31 +0000 (09:37 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 18 Aug 2019 13:37:36 +0000 (09:37 -0400)
- Prevents literal entities display in generated post title

src/Protocol/Feed.php

index 0cf1db7cb799dcafe5789157953c3767f4fe265e..65f2e7b863715ce06c5582e9dca41a74481167c7 100644 (file)
@@ -266,6 +266,9 @@ class Feed {
                        if (empty($item["title"])) {
                                $item["title"] = XML::getFirstNodeValue($xpath, 'rss:title/text()', $entry);
                        }
+
+                       $item["title"] = mb_convert_encoding($item["title"], 'HTML-ENTITIES', "UTF-8");
+
                        $published = XML::getFirstNodeValue($xpath, 'atom:published/text()', $entry);
 
                        if (empty($published)) {