changeset 197:19e92e1ff286

fix the +dom view, details below As we use autoescape now, we need to use Markup() class to give xml into the template. Removed converters argument when calling internal_representation(), use default. Remove unneeded import.
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 29 Apr 2011 21:14:35 +0200
parents 1b3dec65779e
children ade15b9e74fd
files MoinMoin/apps/frontend/views.py MoinMoin/items/__init__.py
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/frontend/views.py	Fri Apr 29 16:35:22 2011 +0200
+++ b/MoinMoin/apps/frontend/views.py	Fri Apr 29 21:14:35 2011 +0200
@@ -161,7 +161,7 @@
     else:
         status = 200
     content = render_template('dom.xml',
-                              data_xml=item._render_data_xml(),
+                              data_xml=Markup(item._render_data_xml()),
                              )
     return Response(content, status, mimetype='text/xml')
 
--- a/MoinMoin/items/__init__.py	Fri Apr 29 16:35:22 2011 +0200
+++ b/MoinMoin/items/__init__.py	Fri Apr 29 21:14:35 2011 +0200
@@ -160,7 +160,7 @@
     def feed_input_conv(self):
         return self.name
 
-    def internal_representation(self, converters=['smiley', 'link']):
+    def internal_representation(self, converters=['smiley']):
         """
         Return the internal representation of a document using a DOM Tree
         """
@@ -182,7 +182,7 @@
             from MoinMoin.converter import default_registry as reg
             from MoinMoin.util.iri import Iri
             from MoinMoin.util.mime import Type, type_moin_document
-            from MoinMoin.util.tree import moin_page, xlink
+            from MoinMoin.util.tree import moin_page
             input_conv = reg.get(Type(self.mimetype), type_moin_document)
             if not input_conv:
                 raise TypeError("We cannot handle the conversion from %s to the DOM tree" % self.mimetype)
@@ -247,9 +247,9 @@
         flaskg.clock.stop('conv_serialize')
         return out
 
-    def _render_data_xml(self, converters):
+    def _render_data_xml(self):
         from MoinMoin.util.tree import moin_page, xlink, html
-        doc = self.internal_representation(converters)
+        doc = self.internal_representation()
 
         from array import array
         out = array('u')