From 5493a52793e424762803b300cf7b056fd2359328 Mon Sep 17 00:00:00 2001 From: za-creature Date: Thu, 11 Apr 2013 22:32:04 +0300 Subject: [PATCH] Update connection-parameters.js Different double-encode removal strategy --- lib/connection-parameters.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/connection-parameters.js b/lib/connection-parameters.js index c75515ab..aec183bb 100644 --- a/lib/connection-parameters.js +++ b/lib/connection-parameters.js @@ -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;