# HG changeset patch # User Steve Losh # Date 1276447819 14400 # Node ID cec804c971653ddc0bd7337d98706898dabc996e # Parent b39562553ee2e55f9486aa53877f3b90912beceb web: temp fix for unicode in diffs diff -r b39562553ee2 -r cec804c97165 review/templates/diff.html --- a/review/templates/diff.html Sun Jun 13 12:43:46 2010 -0400 +++ b/review/templates/diff.html Sun Jun 13 12:50:19 2010 -0400 @@ -38,7 +38,7 @@ {{ line['number'] }} {% if line_type == 'add' %}+{% elif line_type == 'rem' %}-{% endif %} - {{ line['content'][1:]|escape }} + {{ utils['decode'](line['content'][1:])|escape }} {% endwith %} diff -r b39562553ee2 -r cec804c97165 review/web_ui.py --- a/review/web_ui.py Sun Jun 13 12:43:46 2010 -0400 +++ b/review/web_ui.py Sun Jun 13 12:50:19 2010 -0400 @@ -56,6 +56,7 @@ 'categorize_signoffs': _categorize_signoffs, 'map': map, 'str': str, + 'decode': lambda s: s.decode('utf-8'), } def _render(template, **kwargs):