python/cgi/html bug
Dfenestr8
chrisdewinN0SPAM at yahoo.com.au
Wed Jan 19 03:36:40 EST 2005
On Tue, 18 Jan 2005 21:50:58 -0800, Dan Bishop wrote:
>
> Dfenestr8 wrote:
>> Hi.
>>
>> I've written a cgi messageboard script in python, for an irc chan I
> happen
>> to frequent.
>>
>> Bear with me, it's hard for me to describe what the bug is. So I've
>> divided this post into two sections: HOW MY SCRIPTS WORKS, and WHAT
> THE
>> BUG IS.
>> ...
>> The problem is when someone posts a new topic, and that topic happens
> to
>> have "" double quotes, or any other strange character, some strange
>> glitches occur.
>
> Use cgi.escape(topic, True) to convert HTML special characters to the
> equivalent ampersand escape sequences.
Thanx.
Seems to work now. :)
More information about the Python-list
mailing list