From 417886161ccaded41060d2aa3cc622a7a771ebba Mon Sep 17 00:00:00 2001 From: Naoki Takezoe Date: Sat, 16 Jul 2016 11:00:29 +0900 Subject: [PATCH] (refs #1242) Bugfix in branch protection for branches which contain / --- src/main/twirl/gitbucket/core/settings/branches.scala.html | 2 +- .../twirl/gitbucket/core/settings/branchprotection.scala.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/twirl/gitbucket/core/settings/branches.scala.html b/src/main/twirl/gitbucket/core/settings/branches.scala.html index 15a1ffb61..75331a15e 100644 --- a/src/main/twirl/gitbucket/core/settings/branches.scala.html +++ b/src/main/twirl/gitbucket/core/settings/branches.scala.html @@ -39,7 +39,7 @@ diff --git a/src/main/twirl/gitbucket/core/settings/branchprotection.scala.html b/src/main/twirl/gitbucket/core/settings/branchprotection.scala.html index 877ee5fd1..9fb7137ae 100644 --- a/src/main/twirl/gitbucket/core/settings/branchprotection.scala.html +++ b/src/main/twirl/gitbucket/core/settings/branchprotection.scala.html @@ -110,7 +110,7 @@ function submitForm(e){ var protection = getValue(); $.ajax({ method:'PATCH', - url:'@context.path/api/v3/repos/@repository.owner/@repository.name/branches/@helpers.encodeRefName(branch)', + url:'@context.path/api/v3/repos/@repository.owner/@repository.name/branches/@helpers.urlEncode(branch)', contentType: 'application/json', dataType: 'json', data:JSON.stringify({protection:protection}),