Cookie coding problem


#1

Hi, guys
My Cookie is
Cookies[:test] => {:value => “<<>>”,
:expires => 1.day.from_now,
: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


#2

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
“translated”.


#3

Joe B. wrote:

require ‘cgi’
test = CGI::unescape(cookies[:test][:value])


#4

thanks all of you guys.
i lost my pwd. here is joe reply