You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2019/02/20 22:55:53 UTC

[allura] branch db/6440 created (now c646654)

This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a change to branch db/6440
in repository https://gitbox.apache.org/repos/asf/allura.git.


      at c646654  [#6440] [#5743] [#6089] fix encoding on commit/diff/file view

This branch includes the following new commits:

     new c646654  [#6440] [#5743] [#6089] fix encoding on commit/diff/file view

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[allura] 01/01: [#6440] [#5743] [#6089] fix encoding on commit/diff/file view

Posted by br...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch db/6440
in repository https://gitbox.apache.org/repos/asf/allura.git

commit c646654177f21d38b68a859dc283d59f6e55ad67
Author: Dave Brondsema <da...@brondsema.net>
AuthorDate: Wed Feb 20 17:41:50 2019 -0500

    [#6440] [#5743] [#6089] fix encoding on commit/diff/file view
---
 Allura/allura/lib/app_globals.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Allura/allura/lib/app_globals.py b/Allura/allura/lib/app_globals.py
index 58d5b0e..1e63594 100644
--- a/Allura/allura/lib/app_globals.py
+++ b/Allura/allura/lib/app_globals.py
@@ -405,6 +405,7 @@ class Globals(object):
                 cssclass='codehilite', linenos=False)
         else:
             formatter = self.pygments_formatter
+        text = h.really_unicode(text)
         if lexer is None:
             try:
                 lexer = pygments.lexers.get_lexer_for_filename(
@@ -412,7 +413,6 @@ class Globals(object):
             except pygments.util.ClassNotFound:
                 # no highlighting, but we should escape, encode, and wrap it in
                 # a <pre>
-                text = h.really_unicode(text)
                 text = cgi.escape(text)
                 return h.html.literal(u'<pre>' + text + u'</pre>')
         else: