Reply to Re: Problem loading html containing scripts using Dom LoadHTML

Your name:

Reply:


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:

'&' => '&'
'<' => '&lt;'

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация