Fix server error when displaying a tool dependency installation status when the tool dependency contains certain unicode characters in the displayed error message.

This commit is contained in:
Dave Bouvier
2013-06-04 11:05:17 -04:00
parent 64f08d4f02
commit 6334bd05e3
+1 -1
View File
@@ -1214,7 +1214,7 @@ def to_safe_string( text, to_html=True ):
if text:
if to_html:
try:
escaped_text = text.decode( 'utf-8' )
escaped_text = unicodify( text )
escaped_text = escaped_text.encode( 'ascii', 'ignore' )
escaped_text = str( markupsafe.escape( escaped_text ) )
except UnicodeDecodeError, e: