[twill] tidy_ok is nice, but I need something more strict

iain duncan iainduncan at telus.net
Mon Dec 24 13:36:22 PST 2007

On Mon, 2007-24-12 at 21:13 +0000, Matthew Wilson wrote:
> tidy_ok seems to let a lot of unholy html pass through.  For example, I
> would love to have my twill tests catch instances of img tags lacking
> alt attributes.

Is that invalid xhtml though? As far as I could tell, I couldn't find
bad xhtml that Tidy couldn't clean up into valid xhtml. I would think if
you need it to apply a specific set of rules, you would need to parse
through the tags yourself. You could do this with Beautiful Soup fairly


More information about the twill mailing list