# HG changeset patch # User Marcin Kuzminski # Date 2019-09-09 08:47:13 # Node ID aa0b54b754dade1a66351dc93e9e37582c8d6b6d # Parent ab69d1e3879c85bce96e8924982286ff4888a094 svn: handle non-ascii message editing. diff --git a/rhodecode/lib/middleware/simplesvn.py b/rhodecode/lib/middleware/simplesvn.py --- a/rhodecode/lib/middleware/simplesvn.py +++ b/rhodecode/lib/middleware/simplesvn.py @@ -29,7 +29,7 @@ from pyramid.httpexceptions import HTTPN from rhodecode.lib import rc_cache from rhodecode.lib.middleware import simplevcs from rhodecode.lib.utils import is_valid_repo -from rhodecode.lib.utils2 import str2bool, safe_int +from rhodecode.lib.utils2 import str2bool, safe_int, safe_str from rhodecode.lib.ext_json import json from rhodecode.lib.hooks_daemon import store_txn_id_data @@ -98,7 +98,8 @@ class SimpleSvnApp(object): raise if response.status_code not in [200, 401]: - text = '\n{}'.format(response.text) if response.text else '' + from rhodecode.lib.utils2 import safe_str + text = '\n{}'.format(safe_str(response.text)) if response.text else '' if response.status_code >= 500: log.error('Got SVN response:%s with text:`%s`', response, text) else: