htmllib: CR in CDATA
Fredrik Lundh
fredrik at pythonware.com
Tue Jun 22 07:15:28 EDT 1999
Mark Nottingham wrote:
> It appears that htmllib doesn't ignore returns in CDATA fields, as HTML 4.0
> says it should.
well, htmllib doesn't claim to be HTML 4.0 compliant...
> OK, I'm starting to have a really nice conversation with myself now ;-)
>
> htmllib DOESN'T change the newline to a single space - it leaves it in.
>
> CDATA is a sequence of characters from the document character set and may
> include character entities. User agents should interpret attribute values as
> follows:
> Replace character entities with characters,
> Ignore line feeds,
> Replace each carriage return or tab with a single space.
> User agents may ignore leading and trailing white space in CDATA
> attribute values (e.g., " myval " may be interpreted as "myval").
> Authors should not declare attribute values with leading or trailing white
> space.
...and it doesn't claim to be a "user agent", either...
</F>
More information about the Python-list
mailing list