[Twisted-Python] Woven-generated html needs newlines and whitespace

screwtape at froup.com screwtape at froup.com
Fri Jun 6 09:16:17 EDT 2003

On Thu, Jun 05, 2003 at 10:33:04AM -0700, Donovan Preston wrote:
> On Thursday, June 5, 2003, at 09:46 AM, Patrick K. O'Brien wrote:
> >I typed in that example and ran it.  The html it generated could 
> >really use
> >some well-placed newlines.  Indentation wouldn't hurt either.  How 
> >would I
> >modify that example to add newlines and indentation to the html?
> There is a reason the output looks like that, specifically buggy 
> browsers. Browsers claim to be whitespace agnostic but appear to format 
> certain things, such as tables with images in the cells, differently if 
> there is any whitespace in the cell. This was the reason I was told 
> woven couldn't output pretty-printed xml; I have not been able to 
> reproduce this behavior however. Can someone who has experienced this 
> problem (mesozoic, glyph?) please email me an example of the 
> problematic HTML?

The 'problematic' status of the HTML is an issue of quite some debate.
In short, traditional browsers had an edge-case with images inside
table cells, which modern browsers (because of the above-mentioned
whitespace agnosticism) should treat differently.

I'd go into more detail, but the problem is best described in detail
in the Mozilla bug database, where someone filed a bug because Mozilla
didn't follow the traditional behaviour. It was filed in December
1999, the last comment was posted in May 2003 (so far). There have
been 130 duplicate bugs filed.


There may be other places where supposedly whitespace-agnostic
browsers are actually whitespace-sensitive, but that's the one you

In a perfect world, I'd have block HTML elements on their own lines,
and inline HTML elements, well, inline. But since Woven spits out XML
rather than HTML, that'd be quite hacky to implement. :)

 ___________ ____________________________
| Screwtape | Reply-To: munged on Usenet |________ ______ ____ __ _  _   _
| "this confirms my theory that screwtape is god." -- kristen

More information about the Twisted-Python mailing list