[Gas] WARNING: very minor Gas bugfix means minor changes to YOUR apps

Zachary C. Miller wolfgang at wolfgang.groogroo.com
Mon Jun 4 23:54:20 CDT 2001


alright I finally made a change I've been meaning to make for a while.

Gas::form_preamble no longer makes a call to "CGI::escape" for every
value that it puts in a type=hidden tag because the browser already
CGI escapes anything that is in a form tag. Stuff in form tags should
be HTML escaped ( " => " , > => > , etc) but it doesn't need
to be CGI escaped. So I changed the CGI::escape to
HTML::Entities::escape_entities. 

This means that any code you have written in which you call
URI::Escape::uri_unescape or CGI::unescape on the results of a
$cgi->param() call should have that unescape call removed. You only
needed that call before because data from type=hidden fields was being
DOUBLE escaped (once by the code and once by the browser), and then
CGI.pm unescaped it once so you had to have your code unescape it
again. Now it'll all just work. 

I've already fixed Psychics so no need to worry about that. 

In general you shouldn't ever have a need to CGI escape or unescape
(unless you are building a URL without the aid of Gas::url) stuff
since the browser or Gas.pm should handle that.

Even though this change potentially destabilizes existing Gas
applications I think the destabilization is VERY minor since most of
the time there will be no consequences even if you have the extraneous
"unescape" in your code, there won't be any escaped strings to
unescape and nothing will happen. I have simply restored Gas to do
what it is supposed to by fixing a bug that others had worked around
in applications...now it is time to undo your work arounds.

Let me know if this doesn't make sense.

-- 
Zachary C. Miller - @= - http://wolfgang.groogroo.com/
IMSA 1995 - UIUC 2000 - Just Another Leftist Muppet - Ya Basta!
 Social Justice, Community, Nonviolence, Decentralization, Feminism,
 Sustainability, Responsibility, Diversity, Democracy, Ecology














More information about the Gas mailing list