|
Posted by Toby A Inkster on 05/15/07 08:50
Jerry Stuckle wrote:
> But does it validate (http://validator.w3.org)? Pages can load in
> browsers without error and still not validate. The browsers are very
> forgiving, and make a "best guess" as to what the page creator wanted.
From the excerpts posted, no. Javascript blocks in XHTML must be entity
encoded -- that is:
'&' => '&'
'<' => '<'
at a minimum. If not, then the document is not valid.
If a document is not valid, then DOMDocument might not be able to load it
correctly. Or rather, "correctly" is not defined, so DOMDocument is free
to interpret it however it likes!
--
Toby A Inkster BSc (Hons) ARCS
http://tobyinkster.co.uk/
Geek of ~ HTML/SQL/Perl/PHP/Python/Apache/Linux
[Back to original message]
|