diff --git a/src/main/scala/view/helpers.scala b/src/main/scala/view/helpers.scala
index 25c744d..3a868b1 100644
--- a/src/main/scala/view/helpers.scala
+++ b/src/main/scala/view/helpers.scala
@@ -67,6 +67,11 @@
.replaceAll("\\[user:([^\\s]+?)\\]" , s"""$$1""")
)
+ /**
+ * URL encode except '/'.
+ */
+ def encodeBranchName(value: String): String = StringUtil.urlEncode(value).replace("%2F", "/")
+
def urlEncode(value: String): String = StringUtil.urlEncode(value)
def urlEncode(value: Option[String]): String = value.map(urlEncode).getOrElse("")
diff --git a/src/main/twirl/pulls/compare.scala.html b/src/main/twirl/pulls/compare.scala.html
index 3c893a2..ba442ff 100644
--- a/src/main/twirl/pulls/compare.scala.html
+++ b/src/main/twirl/pulls/compare.scala.html
@@ -27,7 +27,7 @@
}
@helper.html.dropdown(originId, "base") {
@originRepository.branchList.map { branch =>
-
@helper.html.checkicon(branch == originId) @branch
+ @helper.html.checkicon(branch == originId) @branch
}
}
...
@@ -38,7 +38,7 @@
}
@helper.html.dropdown(forkedId, "compare") {
@forkedRepository.branchList.map { branch =>
- @helper.html.checkicon(branch == forkedId) @branch
+ @helper.html.checkicon(branch == forkedId) @branch
}
}
diff --git a/src/main/twirl/repo/blob.scala.html b/src/main/twirl/repo/blob.scala.html
index d509e0c..96cd73f 100644
--- a/src/main/twirl/repo/blob.scala.html
+++ b/src/main/twirl/repo/blob.scala.html
@@ -9,12 +9,12 @@
@html.header("code", repository)
@tab(branch, repository, "files")
@@ -30,7 +30,7 @@
diff --git a/src/main/twirl/repo/branches.scala.html b/src/main/twirl/repo/branches.scala.html
index f88b6ee..c8c5681 100644
--- a/src/main/twirl/repo/branches.scala.html
+++ b/src/main/twirl/repo/branches.scala.html
@@ -16,7 +16,7 @@
@branchInfo.map { case (branchName, latestUpdateDate) =>
- @branchName
+ @branchName
@*
Delete branch
*@
@@ -28,10 +28,10 @@
@if(repository.repository.defaultBranch == branchName){
Base branch
} else {
- to @{repository.repository.defaultBranch}
+ to @{repository.repository.defaultBranch}
}
|
- ZIP |
+ ZIP |
}
diff --git a/src/main/twirl/repo/commit.scala.html b/src/main/twirl/repo/commit.scala.html
index 17cef3b..9a0805f 100644
--- a/src/main/twirl/repo/commit.scala.html
+++ b/src/main/twirl/repo/commit.scala.html
@@ -26,7 +26,7 @@
@branches.zipWithIndex.map { case (branch, i) =>
- @branch
+ @branch
}
}
diff --git a/src/main/twirl/repo/commits.scala.html b/src/main/twirl/repo/commits.scala.html
index efdf3c9..26f0d9a 100644
--- a/src/main/twirl/repo/commits.scala.html
+++ b/src/main/twirl/repo/commits.scala.html
@@ -11,16 +11,16 @@
@tab(branch, repository, if(pathList.isEmpty) "commits" else "files")
@if(pathList.isEmpty){
-
@repository.name / Commit History
+
@repository.name / Commit History
}
@if(pathList.nonEmpty){
History for
-
@repository.name /
+
@repository.name /
@pathList.zipWithIndex.map { case (section, i) =>
@if(i == pathList.length - 1){
@section
} else {
-
@section /
+
@section /
}
}
}
diff --git a/src/main/twirl/repo/files.scala.html b/src/main/twirl/repo/files.scala.html
index 7eb2e15..28cce85 100644
--- a/src/main/twirl/repo/files.scala.html
+++ b/src/main/twirl/repo/files.scala.html
@@ -12,12 +12,12 @@