diff options
author | Sébastien SAUVAGE <sebsauvage@sebsauvage.net> | 2013-02-28 14:48:11 +0100 |
---|---|---|
committer | Sébastien SAUVAGE <sebsauvage@sebsauvage.net> | 2013-02-28 14:48:11 +0100 |
commit | 3e0ef647a370f98aa638a7163730d4a7ffdfed5c (patch) | |
tree | 5208ea3c9198ac2cc18f6cb5e8a8e3f8eeac09e7 | |
parent | f37664a2b87668580577f3262f8e57c1ea8ad8a8 (diff) | |
download | Shaarli-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.
-rw-r--r-- | index.php | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 | { |