cvs: php-master-web /scripts rss_parser
| From: | Nuno Lopes | Date: | Wed, 01 Mar 2006 12:41:26 +0000 |
| Subject: | cvs: php-master-web /scripts rss_parser | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-30765@lists.php.net to get a copy of this message | ||
nlopess Wed Mar 1 12:41:26 2006 UTC
Modified files:
/php-master-web/scripts rss_parser
Log:
fix the encoding stuff. do not run htmlspecialchars() on the text, as it should be already safe
http://cvs.php.net/viewcvs.cgi/php-master-web/scripts/rss_parser?r1=1.14&r2=1.15&diff_format=u
Index: php-master-web/scripts/rss_parser
diff -u php-master-web/scripts/rss_parser:1.14 php-master-web/scripts/rss_parser:1.15
--- php-master-web/scripts/rss_parser:1.14 Wed Mar 1 12:28:54 2006
+++ php-master-web/scripts/rss_parser Wed Mar 1 12:41:26 2006
@@ -151,7 +151,7 @@
// Generate RSS header text and inject it into $RSS
function GenerateRSSHeader($headlines, &$RSS) {
- $RSS .= "<" . "?xml version=\"1.0\"
encoding=\"iso-8859-1\"?>\n" .
+ $RSS .= "<" . "?xml version=\"1.0\"
encoding=\"utf-8\"?>\n" .
"<rdf:RDF\n" .
"\txmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n"
.
"\txmlns=\"http://purl.org/rss/1.0/\"\n" .
@@ -180,9 +180,9 @@
// Add an RSS item's information to $RSS
function GenerateRSSItem($href, $title, $text, $date, &$RSS) {
$RSS .= "\n<item rdf:about=\"$href\">\n" .
- "\t<title>" . htmlspecialchars($title) . "</title>\n" .
- "\t<link>" . htmlspecialchars($href) . "</link>\n" .
- "\t<description>" . htmlspecialchars($text) .
"</description>\n" .
+ "\t<title>$title</title>\n" .
+ "\t<link>$href</link>\n" .
+ "\t<description>$text</description>\n" .
"\t<dc:date>" . $date . "</dc:date>\n" .
"</item>\n";
}