changeset 108:bb88373a7f96

fixed escaping for RSS feed with diff=1 imported from: moin--main--1.5--patch-110
author Thomas Waldmann <tw@waldmann-edv.de>
date Sat, 15 Oct 2005 22:21:15 +0000
parents fc0f131e591d
children 3da4fe3841ea
files MoinMoin/action/rss_rc.py docs/CHANGES
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/rss_rc.py	Sat Oct 15 22:05:41 2005 +0000
+++ b/MoinMoin/action/rss_rc.py	Sat Oct 15 22:21:15 2005 +0000
@@ -164,8 +164,11 @@
                 if rev <= item.rev:
                     if idx+1 < rl:
                         lines = wikiutil.pagediff(request, item.pagename, revisions[idx+1], item.pagename, 0, ignorews=1)
-                        if len(lines) > 20: lines = lines[:20] + ['...\n']
-                        desc_text = '%s\n<pre>\n%s\n</pre>\n' % (desc_text, '\n'.join(lines))
+                        if len(lines) > 20:
+                            lines = lines[:20] + ['...\n']
+                        lines = '\n'.join(lines)
+                        lines = wikiutil.escape(lines)
+                        desc_text = '%s\n<pre>\n%s\n</pre>\n' % (desc_text, lines)
                     break
         if desc_text:
             handler.simpleNode('description', desc_text)
--- a/docs/CHANGES	Sat Oct 15 22:05:41 2005 +0000
+++ b/docs/CHANGES	Sat Oct 15 22:21:15 2005 +0000
@@ -244,6 +244,7 @@
       unicode, see wikiutil.py. Also made a similar fix for making and parsing
       query strings.
     * Fixed MonthCalendar tooltips when containing special chars like quotes.
+    * Added html escaping for diff text for RSS feed with diff=1.
     
 Version 1.4: