Skip to content

Commit

Permalink
Fixed more cookies
Browse files Browse the repository at this point in the history
  • Loading branch information
DungFu committed Aug 7, 2011
1 parent 5f5b942 commit df9ab71
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/nowUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ var util = {
if (typeof cookie !== 'string') {
return {};
}
var regex = /([^=\s]+)=(.*?)[;$]/g;
var regex = /([^=\s]+)=(.*?)(;|$|\s)/g;
var match = cookie.match(regex);
if (!match) {
return {};
}
var jsonCookie = {};
var index;
for (var i = 0; i < match.length; i++) {
Expand Down

0 comments on commit df9ab71

Please sign in to comment.