aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorSébastien SAUVAGE <sebsauvage@sebsauvage.net>2013-02-28 14:48:11 +0100
committerSébastien SAUVAGE <sebsauvage@sebsauvage.net>2013-02-28 14:48:11 +0100
commit3e0ef647a370f98aa638a7163730d4a7ffdfed5c (patch)
tree5208ea3c9198ac2cc18f6cb5e8a8e3f8eeac09e7 /index.php
parentf37664a2b87668580577f3262f8e57c1ea8ad8a8 (diff)
downloadShaarli-3e0ef647a370f98aa638a7163730d4a7ffdfed5c.tar.gz
Shaarli-3e0ef647a370f98aa638a7163730d4a7ffdfed5c.tar.zst
Shaarli-3e0ef647a370f98aa638a7163730d4a7ffdfed5c.zip
RSS patch for Thunderbird (and some RSS clients).
In the RSS specifications, the "link" tags contains the URL to follow, and the "guid" contains a unique identifier (which may or may not be an URL). RSS clients should always use "link" to follow the link (and most do), but Thunderbird uses the "guid" if it find a valid URL inside (and only falls back to "link" if "guid" is not an URL). I have patched the RSS feed so that Thunderbird ignores the URL in guid.
Diffstat (limited to 'index.php')
-rw-r--r--index.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/index.php b/index.php
index d66da41e..afe2d039 100644
--- a/index.php
+++ b/index.php
@@ -904,9 +904,9 @@ function showRSS()
904 $absurl = htmlspecialchars($link['url']); 904 $absurl = htmlspecialchars($link['url']);
905 if (startsWith($absurl,'?')) $absurl=$pageaddr.$absurl; // make permalink URL absolute 905 if (startsWith($absurl,'?')) $absurl=$pageaddr.$absurl; // make permalink URL absolute
906 if ($usepermalinks===true) 906 if ($usepermalinks===true)
907 echo '<item><title>'.htmlspecialchars($link['title']).'</title><guid>'.$guid.'</guid><link>'.$guid.'</link>'; 907 echo '<item><title>'.htmlspecialchars($link['title']).'</title><guid isPermaLink="false">'.$guid.'</guid><link>'.$guid.'</link>';
908 else 908 else
909 echo '<item><title>'.htmlspecialchars($link['title']).'</title><guid>'.$guid.'</guid><link>'.$absurl.'</link>'; 909 echo '<item><title>'.htmlspecialchars($link['title']).'</title><guid isPermaLink="false">'.$guid.'</guid><link>'.$absurl.'</link>';
910 if (!$GLOBALS['config']['HIDE_TIMESTAMPS'] || isLoggedIn()) echo '<pubDate>'.htmlspecialchars($rfc822date)."</pubDate>\n"; 910 if (!$GLOBALS['config']['HIDE_TIMESTAMPS'] || isLoggedIn()) echo '<pubDate>'.htmlspecialchars($rfc822date)."</pubDate>\n";
911 if ($link['tags']!='') // Adding tags to each RSS entry (as mentioned in RSS specification) 911 if ($link['tags']!='') // Adding tags to each RSS entry (as mentioned in RSS specification)
912 { 912 {