1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 18:17:20 +00:00

Fix crash with illegal arguments to decodeuri(component)

Fixes #3428
This commit is contained in:
Jermolene 2018-09-09 20:48:53 +01:00
parent f9eed0dc87
commit 874318091e

View File

@ -19,7 +19,12 @@ Export our filter functions
exports.decodeuricomponent = function(source,operator,options) {
var results = [];
source(function(tiddler,title) {
results.push(decodeURIComponent(title));
var value = title;
try {
value = decodeURIComponent(title);
} catch(e) {
}
results.push(value);
});
return results;
};
@ -35,7 +40,12 @@ exports.encodeuricomponent = function(source,operator,options) {
exports.decodeuri = function(source,operator,options) {
var results = [];
source(function(tiddler,title) {
results.push(decodeURI(title));
var value = title;
try {
value = decodeURI(title);
} catch(e) {
}
results.push(value);
});
return results;
};