Commits

Michael Kerrin committed 89b705f

Fix up data rendering

Comments (0)

Files changed (1)

MoinMoin/items/__init__.py

         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()