Shitiz Garg avatar Shitiz Garg committed a4ce283

Text::_render_data_diff should return unicode in keeping it consistent with _render_data_diff_atom

Comments (0)

Files changed (3)

MoinMoin/items/__init__.py

         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

MoinMoin/items/_tests/test_Item.py

         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:

MoinMoin/templates/diff.html

 <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 %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.