Skip to content
Myr

Using decodeURIComponent()

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parent cc56c63 · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:lib/express.core.js+2 added-2 removed
110 unmodified lines
111 onRequest : {112 'parse urlencoded bodies' : function() {113 switch (Express.requestHeader('Content-Type')) {114 case 'application/x-www-form-urlencoded':115 Express.request.uri.params = Express.parseParams(unescape(Express.request.body))115 Express.request.uri.params = Express.parseParams(decodeURIComponent(Express.request.body))116 break117 118 case 'application/json':119 Express.request.uri.params = Express.jsonDecode(Express.request.body)
380 unmodified lines
500 var hash = {}501 if (!cookie) return hash502 var attrs = cookie.split(/\s*;\s*/)503 for (var i = 0; i < attrs.length; ++i)504 hash[attrs[i].split('=')[0]] = unescape(attrs[i].split('=')[1])504 hash[attrs[i].split('=')[0]] = decodeURIComponent(attrs[i].split('=')[1])505 return hash506 },507 508 /**
222 unmodified lines