LearnBoost/socket.io-client — Issue #384: Util.query not escaping query string parts
Author: prystupa
Created: 2012-02-07 03:07:32+00:00
State: open

```javascript

util.query = function (base, addition) {
var query = util.chunkQuery(base || '')
, components = [];

util.merge(query, util.chunkQuery(addition || ''));
for (var part in query) {
if (query.hasOwnProperty(part)) {
components.push(part + '=' + query[part]; // bug, not esaping
// should be: components.push(part + '=' + escapeURIComponent(query[part]);
}
}

return components.length ? '?' + components.join('&') : '';
};
```