Bug with parsing url
hellboy81 opened this issue · comments
I have following problem:
it('[%s] should correctly parse url with params containing special chars', function () {
// AssertionError: expected '/my/endpoint?param1=0&parm2' === '/my/endpoint?param1=0&parm2=[%7B%22k]'
// + expected - actual
// -/my/endpoint?param1=0&parm2
// +/my/endpoint?param1=0&parm2=[%7B%22k]
var str = sscanf('/my/endpoint?param1=0&parm2=[%7B%22k]', '%s');
should.strictEqual(str, '/my/endpoint?param1=0&parm2=[%7B%22k]');
done();
})
%s
is a part of long formatted string
sscanf('param1: param1Value, url:<urlValueWithIssue> param3:%s', 'ur: %s' , 'param1', 'url', 'param3')
How can I fix issue?
As I mentioned there are problems with [...]
@hellboy81 I'v fix this bug with commit 0e00b7d, you can check the latest version with npm. (BTW sorry for reply later, it's the Spring Festival period now in China)