From a2e8d24fdbd79cd07519b36dd622a4d07df9596e Mon Sep 17 00:00:00 2001 From: Naoki Takezoe Date: Mon, 16 Oct 2017 18:23:48 +0900 Subject: [PATCH] Fix path encoding in JavaScript --- src/main/twirl/gitbucket/core/repo/find.scala.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/twirl/gitbucket/core/repo/find.scala.html b/src/main/twirl/gitbucket/core/repo/find.scala.html index a5de59dda..833fa5e32 100644 --- a/src/main/twirl/gitbucket/core/repo/find.scala.html +++ b/src/main/twirl/gitbucket/core/repo/find.scala.html @@ -105,7 +105,9 @@ $(function(){ $(".no-results").hide(); for(var i = 0; i < p.length; i++){ var row = template.clone(); - row.find("a").attr("href", pathBase + "/" + p[i].string).html(string_score_highlight(p[i], '')); +// console.log('Path base: ' + pathBase); +// console.log('Path rest ' + p[i].string); + row.find("a").attr("href", pathBase + "/" + encodeURIComponent(p[i].string).replace('%2F', '/')).html(string_score_highlight(p[i], '')); if(cursor == i){ row.addClass("navigation-focus"); }