Forum: Ruby on Rails cookie coding problem

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Joe B. (Guest)
on 2005-11-24 21:28
Hi, guys
My Cookie is
Cookies[:test] => {:value => "<<<joe>>>",
                   :expires =>,
                   :path => "/"}
But when i open this cookie i found
value has been encoded like: %3C%3C%3Cjoe%3E%3E%3E.
I need not encode value.
How to solve this problem
Hendie D. (Guest)
on 2005-11-25 00:34
(Received via mailing list)
Joe, I think it is because cookies are passed to the browser via http,
and the text in it therefore has to be web "safe". If you used
different delimiters like --joe--, it would probably not get
alex (Guest)
on 2005-11-25 10:34
(Received via mailing list)
Joe B. wrote:
require 'cgi'
test = CGI::unescape(cookies[:test][:value])
joe-black (Guest)
on 2005-11-26 14:21
thanks all of you guys.
i lost my pwd. here is joe reply
This topic is locked and can not be replied to.