Closed xhronos closed 10 years ago
This fix for stringToValue() in parser.js seems to work:
function stringToValue(string, parameters){
var converter = exports.converters['default'];
if(string.charAt(0) === "$"){
var param_index = parseInt(string.substring(1)) - 1;
return param_index >= 0 && parameters ? parameters[param_index] : undefined;
}
var parts = /^(\w+):(.*)$/.exec(string); //::::
if (parts && parts[1]) { //::::
converter = exports.converters[parts[1]]; //::::
if(!converter){
throw new URIError("Unknown converter " + parts[1]); //::::
}
string = parts[2]; //::::
}
return converter(string);
};
Passing the following string to the parser
results in
being passed to the converter since the colon is used as delimiter.