diff --git a/rhodecode/lib/hooks_base.py b/rhodecode/lib/hooks_base.py --- a/rhodecode/lib/hooks_base.py +++ b/rhodecode/lib/hooks_base.py @@ -284,17 +284,16 @@ def post_push(extras): output += _http_ret.title if extras.new_refs: - tmpl = \ - extras.server_url + '/' + \ - extras.repository + \ - "/pull-request/new?{ref_type}={ref_name}" + tmpl = extras.server_url + '/' + extras.repository + \ + "/pull-request/new?{ref_type}={ref_name}" + for branch_name in extras.new_refs['branches']: output += 'RhodeCode: open pull request link: {}\n'.format( - tmpl.format(ref_type='branch', ref_name=branch_name)) + tmpl.format(ref_type='branch', ref_name=safe_str(branch_name))) for book_name in extras.new_refs['bookmarks']: output += 'RhodeCode: open pull request link: {}\n'.format( - tmpl.format(ref_type='bookmark', ref_name=book_name)) + tmpl.format(ref_type='bookmark', ref_name=safe_str(book_name))) hook_response = '' if not is_shadow_repo(extras):