py3: ensure unicode before all markup handling paths here
diff --git a/Allura/allura/lib/helpers.py b/Allura/allura/lib/helpers.py
index 8773279..8a526b6 100644
--- a/Allura/allura/lib/helpers.py
+++ b/Allura/allura/lib/helpers.py
@@ -763,7 +763,7 @@
 
 def render_any_markup(name, txt, code_mode=False, linenumbers_style=TABLE):
     """
-    renders markdown using allura enhacements if file is in markdown format
+    renders markdown using allura enhancements if file is in markdown format
     renders any other markup format using the pypeline
     Returns jinja-safe text
     """
@@ -771,8 +771,9 @@
         txt = '<p><em>Empty File</em></p>'
     else:
         fmt = g.pypeline_markup.can_render(name)
+        txt = really_unicode(txt)
         if fmt == 'markdown':
-            txt = g.markdown.convert(really_unicode(txt))
+            txt = g.markdown.convert(txt)
         else:
             txt = g.pypeline_markup.render(name, txt)
         if not fmt: