changeset 1199:a4ce283b0ca2

Text::_render_data_diff should return unicode in keeping it consistent with _render_data_diff_atom
author Shitiz Garg <mail@dragooon.net>
date Wed, 04 Jan 2012 03:52:32 +0530
parents 2aa4f4ec6a94
children 302e1a86f494
files MoinMoin/items/__init__.py MoinMoin/items/_tests/test_Item.py MoinMoin/templates/diff.html
diffstat 3 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/items/__init__.py	Wed Jan 04 03:20:26 2012 +0530
+++ b/MoinMoin/items/__init__.py	Wed Jan 04 03:52:32 2012 +0530
@@ -1131,7 +1131,7 @@
         return self._get_data_diff_html(oldrev, newrev, 'diff_text_atom.html')
 
     def _render_data_diff(self, oldrev, newrev):
-        return Markup(self._get_data_diff_html(oldrev, newrev, 'diff_text.html'))
+        return self._get_data_diff_html(oldrev, newrev, 'diff_text.html')
 
     def _render_data_diff_text(self, oldrev, newrev):
         from MoinMoin.util import diff_text
--- a/MoinMoin/items/_tests/test_Item.py	Wed Jan 04 03:20:26 2012 +0530
+++ b/MoinMoin/items/_tests/test_Item.py	Wed Jan 04 03:52:32 2012 +0530
@@ -400,7 +400,7 @@
         item1 = Binary.create(item_name)
         try:
             from PIL import Image as PILImage
-            result = TransformableBitmapImage._render_data_diff(item1, item.rev, item1.rev)
+            result = Markup(TransformableBitmapImage._render_data_diff(item1, item.rev, item1.rev))
             # On Werkzeug 0.8.2+, urls with '+' are automatically encoded to '%2B'
             # The assert statement works with both older and newer versions of Werkzeug
             # Probably not an intentional change on the werkzeug side, see issue:
--- a/MoinMoin/templates/diff.html	Wed Jan 04 03:20:26 2012 +0530
+++ b/MoinMoin/templates/diff.html	Wed Jan 04 03:52:32 2012 +0530
@@ -4,5 +4,5 @@
 <h1>{{ _("Diff for '%(item_name)s'", item_name=newrev.item.name) }}</h1>
 <br>
 {% endblock %}
-{{ item._render_data_diff(oldrev, newrev) }}
+{{ Markup(item._render_data_diff(oldrev, newrev)) }}
 {% endblock %}