1. Michael Kerrin
  2. moin-2.0

Commits

Michael Kerrin  committed 89b705f

Fix up data rendering

  • Participants
  • Parent commits 8c4328e
  • Branches default

Comments (0)

Files changed (1)

File MoinMoin/items/__init__.py

View file
  • Ignore whitespace
         macro_conv = reg.get(type_moin_document, type_moin_document, macros='expandall')
         # TODO: Real output format
         html_conv = reg.get(type_moin_document, Type('application/x-xhtml-moin-page'))
-        doc = self.internal_representation()
-        doc = self._expand_document(doc)
-        flaskg.clock.start('conv_dom_html')
-        doc = html_conv(doc)
-        flaskg.clock.stop('conv_dom_html')
-        return conv_serialize(doc, {html.namespace: ''})
+        try:
+            doc = self.internal_representation()
+            doc = self._expand_document(doc)
+            flaskg.clock.start('conv_dom_html')
+            doc = html_conv(doc)
+            flaskg.clock.stop('conv_dom_html')
+            return conv_serialize(doc, {html.namespace: ''})
+        except:
+            return "Error rendering content"
 
     def _render_data_xml(self):
         doc = self.internal_representation()