Fix path encoding in JavaScript

This commit is contained in:
Naoki Takezoe
2017-10-16 18:23:48 +09:00
parent 9fb0d7eb40
commit a2e8d24fdb

View File

@@ -105,7 +105,9 @@ $(function(){
$(".no-results").hide(); $(".no-results").hide();
for(var i = 0; i < p.length; i++){ for(var i = 0; i < p.length; i++){
var row = template.clone(); var row = template.clone();
row.find("a").attr("href", pathBase + "/" + p[i].string).html(string_score_highlight(p[i], '<b>')); // 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], '<b>'));
if(cursor == i){ if(cursor == i){
row.addClass("navigation-focus"); row.addClass("navigation-focus");
} }