[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Debian JP master SVN www commits (rev.1135)
=======================================================
Repository: /org/svn.debian.or.jp/repos
Revision: 1135
Commiter: henrich
Date: 2011-02-27 03:05:38 +0900 (日, 27 2月 2011)
=======================================================
Log:
try unescape in rssfeed
=======================================================
Changed:
U www/trunk/blosxom/plugins/rss10
Modified: www/trunk/blosxom/plugins/rss10
===================================================================
--- www/trunk/blosxom/plugins/rss10 2011-02-25 17:32:31 UTC (rev 1134)
+++ www/trunk/blosxom/plugins/rss10 2011-02-26 18:05:38 UTC (rev 1135)
@@ -20,6 +20,19 @@
$T = 'T';
$colon = ":";
+# UnEscape <, >, and &, and to produce valid RSS
+
+ my %unescape = (
+ '<' => '<',
+ '>' => '>',
+ '&' => '&',
+ '"' => '"',
+ ''' => "'"
+ );
+
+ my $unescape_re = join '|' => keys %unescape;
+ $body =~ s/($unescape_re)/$unescape{$1}/g;
+
# --------------------------------------
sub start {