Re: A critique of cgi.escape
- From: Fredrik Lundh <fredrik@xxxxxxxxxxxxxx>
- Date: Sat, 23 Sep 2006 20:19:19 +0200
Lawrence D'Oliveiro wrote:
So I think the default for the second argument to cgi.escape should be
changed to True. Or alternatively, the second argument should be removed
altogether, and quotes should always be escaped.
you're confused: cgi.escape(s) is designed to be used for ordinary text, cgi.escape(s, True) is designed for attributes. if you use the code the way it's intended to be used, it works perfectly fine.
Can changing the default break existing scripts? I don't see how. It might
even fix a few lurking bugs out there.
I'm not sure this "every time I don't immediately understand something, I'll write a change proposal instead of reading the library reference" approach is healthy, really.
</F>
.
- Follow-Ups:
- Re: A critique of cgi.escape
- From: Jon Ribbens
- Re: A critique of cgi.escape
- From: Lawrence D'Oliveiro
- Re: A critique of cgi.escape
- References:
- A critique of cgi.escape
- From: Lawrence D'Oliveiro
- A critique of cgi.escape
- Prev by Date: Re: Help
- Next by Date: Re: Running Python script from C++ code(.NET)
- Previous by thread: A critique of cgi.escape
- Next by thread: Re: A critique of cgi.escape
- Index(es):
Relevant Pages
|