changeset 1224:0e5107719adf

Return a break if rendered_data has no content in it to avoid CSS theming issues.
author Bilal Akhtar <bilalakhtar@ubuntu.com>
date Sat, 07 Jan 2012 21:28:37 -0500
parents d068e342c04e
children 63d51e0ddc47
files MoinMoin/items/__init__.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/items/__init__.py	Fri Jan 06 22:56:57 2012 +0530
+++ b/MoinMoin/items/__init__.py	Sat Jan 07 21:28:37 2012 -0500
@@ -287,7 +287,11 @@
         flaskg.clock.start('conv_dom_html')
         doc = html_conv(doc)
         flaskg.clock.stop('conv_dom_html')
-        return conv_serialize(doc, {html.namespace: ''})
+        rendered_data = conv_serialize(doc, {html.namespace: ''})
+        # Return a break if rendered_data has no content in it
+        # to avoid CSS theming issues
+        return "<br />" if rendered_data == "<div xmlns=\"http://www.w3.org/1999/xhtml\" />" \
+                        else rendered_data
 
     def _render_data_xml(self):
         doc = self.internal_representation()