cvs: pearweb /public_html/feeds feeds.php
| From: | Helgi �ormar �orbj�rnsson | Date: | Sat, 25 Aug 2007 20:18:56 +0000 |
| Subject: | cvs: pearweb /public_html/feeds feeds.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-48494@lists.php.net to get a copy of this message | ||
dufuz Sat Aug 25 20:18:56 2007 UTC
Modified files:
/pearweb/public_html/feeds feeds.php
Log:
Added the content namespace, made a few cosmetics and hopefully fixed Bug #11497 (RSS feed
description field should contain breaks) by adding nl2br before we htmlspecialchar the text, at
least FF now shows things properly with newlines and all.
# Please try this out and let me know if there are any issues with other feed readers after this
change.
http://cvs.php.net/viewvc.cgi/pearweb/public_html/feeds/feeds.php?r1=1.12&r2=1.13&diff_format=u
Index: pearweb/public_html/feeds/feeds.php
diff -u pearweb/public_html/feeds/feeds.php:1.12 pearweb/public_html/feeds/feeds.php:1.13
--- pearweb/public_html/feeds/feeds.php:1.12 Fri May 4 20:12:51 2007
+++ pearweb/public_html/feeds/feeds.php Sat Aug 25 20:18:55 2007
@@ -15,7 +15,7 @@
+----------------------------------------------------------------------+
| Authors: Pierre-Alain Joye <pajoye@php.net> |
+----------------------------------------------------------------------+
- $Id: feeds.php,v 1.12 2007/05/04 20:12:51 cellog Exp $
+ $Id: feeds.php,v 1.13 2007/08/25 20:18:55 dufuz Exp $
*/
require_once 'pepr/pepr.php';
@@ -32,7 +32,12 @@
$rss_top = <<<EOT
<?xml version="1.0" encoding="iso-8859-1"?>
-<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc="http://purl.org/dc/elements/1.1/">
+<rdf:RDF
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns="http://purl.org/rss/1.0/"
+ xmlns:content="http://purl.org/rss/1.0/modules/content/"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+>
<channel rdf:about="http://pear.php.net/">
<link>http://pear.php.net/</link>
<dc:creator>pear-webmaster@lists.php.net</dc:creator>
@@ -66,12 +71,12 @@
$items_xml .= '<rdf:li rdf:resource="' . $url .
'"/>' . "\n";
$item_entries .= "<item rdf:about=" . '"' .$url .
'"' . ">
-<title>$title</title>
- <link>$url</link>
- <description>" . htmlspecialchars($item['releasenotes']) ."
-</description>
-<dc:date>$date</dc:date>
-</item>";
+ <title>$title</title>
+ <link>$url</link>
+ <content:encoded>" . htmlspecialchars(nl2br($item['releasenotes'])) ."
+ </content:encoded>
+ <dc:date>$date</dc:date>
+</item>\n";
$item_entries .= "";
}
@@ -82,6 +87,7 @@
<title>$channel_title</title>
<description>$channel_description</description>
</channel>
+
$item_entries
</rdf:RDF>";