Update connection-parameters.js

Different double-encode removal strategy
This commit is contained in:
za-creature 2013-04-11 22:32:04 +03:00
parent c666b20287
commit 5493a52793

View File

@ -18,7 +18,7 @@ var parse = function(str) {
}
// url parse expects spaces encoded as %20
// however, we don't want to double-encode
str = encodeURI(str).replace(/\%25/g, "%");
str = encodeURI(str).replace(/\%25(\d\d)/g, "%$1");
var result = url.parse(str);
var config = {};
config.host = result.hostname;