refs #12 fix bad decodeURI => decodeURIComponent
parent
cbfcfb7430
commit
6a44ad0e29
|
@ -189,7 +189,7 @@
|
||||||
default_layer = gpxedit.restoredTileLayer;
|
default_layer = gpxedit.restoredTileLayer;
|
||||||
}
|
}
|
||||||
else if (typeof layer !== 'undefined') {
|
else if (typeof layer !== 'undefined') {
|
||||||
default_layer = decodeURI(layer);
|
default_layer = decodeURIComponent(layer);
|
||||||
}
|
}
|
||||||
|
|
||||||
// get url from key and layer type
|
// get url from key and layer type
|
||||||
|
@ -537,7 +537,7 @@
|
||||||
for (var i = 0; i < sURLVariables.length; i++) {
|
for (var i = 0; i < sURLVariables.length; i++) {
|
||||||
var sParameterName = sURLVariables[i].split('=');
|
var sParameterName = sURLVariables[i].split('=');
|
||||||
if (sParameterName[0] === sParam) {
|
if (sParameterName[0] === sParam) {
|
||||||
return sParameterName[1];
|
return decodeURIComponent(sParameterName[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1474,10 +1474,9 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
// load a file if 'file' GET url parameter was given
|
// load a file if 'file' GET url parameter was given
|
||||||
var urlfileparam = getUrlParameter('file');
|
var fileparam = getUrlParameter('file');
|
||||||
var fileparam = decodeURI(urlfileparam);
|
if (fileparam && fileparam !== undefined) {
|
||||||
if (urlfileparam && urlfileparam !== undefined) {
|
loadAction(fileparam);
|
||||||
loadAction(fileparam.replace(/%2F/g, '/'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue