A critique of cgi.escape
jon+usenet at unequivocal.co.uk
Wed Sep 27 11:26:42 CEST 2006
In article <mailman.748.1159310964.10491.python-list at python.org>, Gabriel G wrote:
> By example, I do not validate a "page". I validate that all methods
> that make up pieces of a page, build them the way they should - these
> are our "unit tests". Then, it's up to the templating library to join
> all the pieces into the final html page.
That sounds sensible to me - and also likely to be the sort of tests
that are not going to get broken by changes to cgi.escape ;-)
> I validated the original html against the corresponding dtd some time
> ago (using the w3c validator), and ocasionally when things "looks
> wrong" on a browser, but most of the time the html generated pages
> are not validated nor checked as a whole.
That's possibly a mistake, but obviously that depends on details of
how your overall methodology works that I have no information about.
More information about the Python-list