]> git.mxchange.org Git - friendica.git/commitdiff
Fix ATOM feed title encoding
authorAlexandre Alapetite <alexandre@alapetite.fr>
Fri, 16 Nov 2018 22:52:36 +0000 (23:52 +0100)
committerAlexandre Alapetite <alexandre@alapetite.fr>
Fri, 16 Nov 2018 22:52:36 +0000 (23:52 +0100)
Was HTML-encoded instead of plain Unicode.
Fixed only for feed_mode. Probably wrong as well for non_feed mode (not
sure how to test)

src/Protocol/OStatus.php

index d6562466445940b1a204a8cd251a0fb93be42e0b..557277fe81dc5b181f39420b7379848b899183ef 100644 (file)
@@ -1945,7 +1945,11 @@ class OStatus
                }
 
                XML::addElement($doc, $entry, "id", $item["uri"]);
-               XML::addElement($doc, $entry, "title", $title);
+               if ($feed_mode) {
+                       XML::addElement($doc, $entry, "title", html_entity_decode($title, ENT_QUOTES, 'UTF-8'));
+               } else {
+                       XML::addElement($doc, $entry, "title", $title);
+               }
 
                $body = self::formatPicturePost($item['body']);