diff --git a/pagure/templates/repo_info.html b/pagure/templates/repo_info.html
index c49d430..ac4b372 100644
--- a/pagure/templates/repo_info.html
+++ b/pagure/templates/repo_info.html
@@ -352,7 +352,7 @@ $(function() {
commit not in the main branch. Click to create new PR now.'+'"> New PR \
';
{%endif%}
- var _b = branch.replace('.', '\\.').replace('/', '__').replace('\+', '\\+');
+ var _b = branch.replace(/\./g, '\\.').replace('/', '__').replace('\+', '\\+');
$('#branch-' + _b + ' .branch_del').prepend(html2);
$('[data-toggle="tooltip"]').tooltip({placement : 'bottom'});
}
@@ -370,7 +370,7 @@ $(function() {
title="' + branch +' is already in an opened pull-request">'
+ 'PR#' + res.message.branch_w_pr[branch] + ' \
';
- $('#branch-' + branch.replace('.', '\\.').replace('/', '__')
+ $('#branch-' + branch.replace(/\./g, '\\.').replace('/', '__')
+ ' .branch_del').prepend(html);
$('[data-toggle="tooltip"]').tooltip({placement : 'bottom'});
}