]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/feed/FeedBuilder.php
Merge pull request #1361 from Lucas-C/patch-1
[github/shaarli/Shaarli.git] / application / feed / FeedBuilder.php
index e23b34525b02f6e0920777e51e8cc42ee5d0dca4..957c827339515af83acddcb1245d258b59dad9b0 100644 (file)
@@ -147,8 +147,8 @@ class FeedBuilder
     protected function buildItem($link, $pageaddr)
     {
         $link['guid'] = $pageaddr . '?' . $link['shorturl'];
-        // Check for both signs of a note: starting with ? and 7 chars long.
-        if ($link['url'][0] === '?' && strlen($link['url']) === 7) {
+        // Prepend the root URL for notes
+        if (is_note($link['url'])) {
             $link['url'] = $pageaddr . $link['url'];
         }
         if ($this->usePermalinks === true) {
@@ -157,7 +157,7 @@ class FeedBuilder
             $permalink = '<a href="' . $link['guid'] . '" title="' . t('Permalink') . '">' . t('Permalink') . '</a>';
         }
         $link['description'] = format_description($link['description'], $pageaddr);
-        $link['description'] .= PHP_EOL . '<br>&#8212; ' . $permalink;
+        $link['description'] .= PHP_EOL . PHP_EOL . '<br>&#8212; ' . $permalink;
 
         $pubDate = $link['created'];
         $link['pub_iso_date'] = $this->getIsoDate($pubDate);