[minor] [fix] get_routes_str
This commit is contained in:
parent
9f0c6103f2
commit
b01a61e2e2
1 changed files with 8 additions and 2 deletions
|
|
@ -61,8 +61,14 @@ frappe.get_route_str = function(route) {
|
|||
if(route.substr(0,1)=='#') route = route.substr(1);
|
||||
if(route.substr(0,1)=='!') route = route.substr(1);
|
||||
|
||||
route = $.map(route.split('/'),
|
||||
function(r) { return decodeURIComponent(r); }).join('/');
|
||||
route = $.map(route.split('/'), function(r) {
|
||||
try {
|
||||
return decodeURIComponent(r);
|
||||
} catch(e if e instanceof URIError) {
|
||||
return r;
|
||||
}
|
||||
|
||||
}).join('/');
|
||||
|
||||
return route;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue