mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-25 16:03:13 +00:00
Update connection-parameters.js
Different double-encode removal strategy
This commit is contained in:
parent
c666b20287
commit
5493a52793
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user