>>> But "pre"?  Who ever said that "pre"'s content is CDATA?

Yes, I agree. The HTML 4.01 specification states,

"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."

It goes on to say that for <style> and <script>, the CDATA must be treated
differently by the User Agent.

With <pre>, we cannot ignore line feeds or carriage returns, so it's type
cannot be CDATA. In as_HTML(), I have taken CDATA to mean 'anything that we
do not want to be touched by HTML::Entities'. Which, although possibly
straying from the specification seems to cover all cases ok. So, yes, whilst
a <pre> element is not CDATA, I think (hope?) it's ok to treat it as such.

Good luck Sean!

Robert Bergs <[EMAIL PROTECTED]>
Argo Interactive Limited, http://www.argogroup.com/
Statutory Details, http://www.argogroup.com/statd.html

Reply via email to