]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/Feed.php
Merge pull request #6181 from JonnyTischbein/feature_admin_subsubpages
[friendica.git] / src / Protocol / Feed.php
index 71ebe5506b9dadd78587e6123646af464d9c2d5f..5939e5ce1a929b96c00f0fc21b642acab4856106 100644 (file)
@@ -123,7 +123,13 @@ class Feed {
                                $author["author-name"] = $value;
                        }
                        if ($simulate) {
-                               $author["author-id"] = XML::getFirstNodeValue($xpath, '/atom:feed/atom:author/atom:uri/text()');
+                               $author["author-id"] = XML::getFirstNodeValue($xpath, '/atom:feed/atom:author/atom:id/text()');
+
+                               // See https://tools.ietf.org/html/rfc4287#section-3.2.2
+                               $value = XML::getFirstNodeValue($xpath, 'atom:author/atom:uri/text()');
+                               if ($value != "") {
+                                       $author["author-link"] = $value;
+                               }
 
                                $value = XML::getFirstNodeValue($xpath, 'atom:author/poco:preferredUsername/text()');
                                if ($value != "") {
@@ -344,7 +350,7 @@ class Feed {
                                        $tags .= ', ';
                                }
 
-                               $taglink = "#[url=" . System::baseUrl() . "/search?tag=" . rawurlencode($hashtag) . "]" . $hashtag . "[/url]";
+                               $taglink = "#[url=" . System::baseUrl() . "/search?tag=" . $hashtag . "]" . $hashtag . "[/url]";
                                $tags .= $taglink;
                        }