From af9befc8277c95cc93d045a2d4b1b03612a6acfc Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Nov 23 2017 11:33:49 +0000 Subject: Fix the new PR and delete buttons for branch name with + in them Fixes https://pagure.io/pagure/issue/2795 Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/templates/repo_info.html b/pagure/templates/repo_info.html index c81a3ed..09a23b1 100644 --- a/pagure/templates/repo_info.html +++ b/pagure/templates/repo_info.html @@ -130,7 +130,9 @@ git push -u origin master
{% if g.repo_committer and branch != head and config.get('ALLOW_DELETE_BRANCH', True) %} -
{{ form.csrf_token }} + onclick="$('#delete_branch_form-{{ + branch | replace('/', '__') | replace('.', '\\\\.') + | replace('+', '___') + }}').submit();">
@@ -334,8 +339,8 @@ $(function() { commit not in the main branch. Click to create new PR now.'+'"> New PR \
'; {%endif%} - $('#branch-' + branch.replace('.', '\\.').replace('/', '__') - + ' .branch_del').prepend(html2); + var _b = branch.replace('.', '\\.').replace('/', '__').replace('\+', '\\+'); + $('#branch-' + _b + ' .branch_del').prepend(html2); $('[data-toggle="tooltip"]').tooltip({placement : 'bottom'}); } for (branch in res.message.branch_w_pr){