[Xitami] '&' character in <textarea...> problem

Paul Reid xitami@lists.xitami.org
Wed, 15 Aug 2001 13:16:05 -0400


> Python cgi module and the IE5.
> if I submit a text that contains somewhere the character
> '&', it will cut off this character and all text that follows.

Your browser may be hiding anything after a "&". Check in View Source.
NetScape seems to be smart about "&" appearing bare with no terminating
";" in sight, but other browsers may swallow everything between "&" and
the next ";" (or the end of the file!). 

I don't work with Python.

In Perl, I do this: "use CGI qw(:standard escapeHTML);"

The "CGI::escapeHTML" functions serve to escape any HTML-like markup in
the form return. "&" is the HTML prefix for non-ASCII character
entities, and for GET delimiting, so if it isn't being used as HTML it
has to be escaped. 

Python must have such a thing, and I'd look in their CGI collection
first.

 -PRR