Skip to content
Myr

unescaping cookie values

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

authored by visionmedia · committed by visionmedia · parent 5be8088 · Browse files · 2 files+8 added−4 removed
This commit

State

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

Diff stats

2 files+8 added−4 removed

  • tests:+6 added−2 removed
  • other:+2 added−2 removed

2 files+8 added−4 removed

modified:lib/express.core.js+2 added-2 removed
161 unmodified lines
162 },163 164 parseCookie : function(cookie) {165 var hash = {}166 var attrs = cookie.split(';')166 var attrs = cookie.split(/\s*;\s*/)167 for (i = 0; i < attrs.length; ++i)168 hash[attrs[i].split('=')[0]] = attrs[i].split('=')[1]168 hash[attrs[i].split('=')[0]] = unescape(attrs[i].split('=')[1])169 return hash170 },171 172 /**
256 unmodified lines
modified:spec/spec.core.js+6 added-2 removed