You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by ke...@apache.org on 2019/02/22 21:23:23 UTC
[allura] branch master updated: [#6440] [#5743] [#6089] fix
encoding on commit/diff/file view
This is an automated email from the ASF dual-hosted git repository.
kentontaylor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git
The following commit(s) were added to refs/heads/master by this push:
new 9eedfda [#6440] [#5743] [#6089] fix encoding on commit/diff/file view
9eedfda is described below
commit 9eedfda02c356f83ee325442ba9a9393632762ba
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: