changeset 658:e9eff264e2b9

merged head
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 16 May 2006 20:14:04 +0200
parents 016a8a3ef354 (current diff) e420833c5f08 (diff)
children f72fad57425a
files
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Tue May 16 20:12:29 2006 +0200
+++ b/.hgignore	Tue May 16 20:14:04 2006 +0200
@@ -1,4 +1,5 @@
 \{arch\}
 .*\.arch-ids/.*
 .*\.py[co]
+sa
 
--- a/MoinMoin/support/htmlmarkup.py	Tue May 16 20:12:29 2006 +0200
+++ b/MoinMoin/support/htmlmarkup.py	Tue May 16 20:14:04 2006 +0200
@@ -204,6 +204,8 @@
         'span', 'src', 'start', 'style', 'summary', 'tabindex',
         'target', 'title', 'type', 'usemap', 'valign', 'value',
         'vspace', 'width'])
+    ignore_tags = frozenset(['html', 'body'])
+    
     uri_attrs = frozenset(['action', 'background', 'dynsrc', 'href',
                            'lowsrc', 'src'])
     safe_schemes = frozenset(['file', 'ftp', 'http', 'https', 'mailto',
@@ -217,6 +219,9 @@
     def handle_starttag(self, tag, attrs):
         if self.waiting_for:
             return
+        if tag in self.ignore_tags:
+            return
+        
         if tag not in self.safe_tags:
             self.waiting_for = tag
             return
@@ -268,6 +273,9 @@
             self.out.write(escape(data, quotes=False))
 
     def handle_endtag(self, tag):
+        if tag in self.ignore_tags:
+            return
+
         if self.waiting_for:
             if self.waiting_for == tag:
                 self.waiting_for = None