]> git.mxchange.org Git - friendica.git/commitdiff
Replace mb_convert_encoding with html_entity_decode for feed item title conversion
authorHypolite Petovan <hypolite@mrpetovan.com>
Thu, 22 Aug 2019 10:00:21 +0000 (06:00 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Thu, 22 Aug 2019 10:00:21 +0000 (06:00 -0400)
- Prevents already UTF-8 strings to be corrupted

src/Protocol/Feed.php

index 65f2e7b863715ce06c5582e9dca41a74481167c7..c678cf0ae8a06344b8a3b836cb22719525a132c7 100644 (file)
@@ -267,7 +267,7 @@ class Feed {
                                $item["title"] = XML::getFirstNodeValue($xpath, 'rss:title/text()', $entry);
                        }
 
-                       $item["title"] = mb_convert_encoding($item["title"], 'HTML-ENTITIES', "UTF-8");
+                       $item["title"] = html_entity_decode($item["title"], ENT_QUOTES, 'UTF-8');
 
                        $published = XML::getFirstNodeValue($xpath, 'atom:published/text()', $entry);