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

Your name:

Reply:


Posted by shimmyshack on 05/15/07 11:32

On May 15, 9:50 am, Toby A Inkster <usenet200...@tobyinkster.co.uk>
wrote:
> 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:
>
> '&' => '&amp;'
> '<' => '&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) ARCShttp://tobyinkster.co.uk/
> Geek of ~ HTML/SQL/Perl/PHP/Python/Apache/Linux

uising a CDATA block means that the parse wont be tripped up by < and
so forth.

[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

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