Skip to content

Commit

Permalink
Load cookies that contain = and quotes in the value
Browse files Browse the repository at this point in the history
  • Loading branch information
assaf committed Nov 29, 2011
1 parent b9518cc commit c20089a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/zombie/cookies.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ serialize = (domain, path, name, cookie)->
deserialize = (serialized)->
fields = serialized.split(/;+/)
first = fields[0].trim()
[name, value] = first.split(/\=/, 2)
[_, name, value] = first.match(/(.*?)=(.*)/)
value = value.replace(/^"(.*)"$/, "$1")

cookie = { name: name, value: value }
for field in fields
Expand Down

0 comments on commit c20089a

Please sign in to comment.