##// END OF EJS Templates
diffs: handle very odd case of binary, corrupted diffs which crashed the diff parser.
dan -
r3831:0f09c1a7 stable
parent child Browse files
Show More
@@ -168,7 +168,13 b' def render_tokenstream(tokenstream):'
168 168 if op_tag:
169 169 result.append(u'<%s>' % op_tag)
170 170
171 # NOTE(marcink): in some cases of mixed encodings, we might run into
172 # troubles in the html_escape, in this case we say unicode force on token_text
173 # that would ensure "correct" data even with the cost of rendered
174 try:
171 175 escaped_text = html_escape(token_text)
176 except TypeError:
177 escaped_text = html_escape(safe_unicode(token_text))
172 178
173 179 # TODO: dan: investigate showing hidden characters like space/nl/tab
174 180 # escaped_text = escaped_text.replace(' ', '<sp> </sp>')
General Comments 0
You need to be logged in to leave comments. Login now