|
Posted by loretta on 05/16/07 12:51
On May 15, 7:32 am, shimmyshack <matt.fa...@gmail.com> wrote:
> 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:
>
> > '&' => '&'
> > '<' => '<'
>
> > 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.- Hide quoted text -
>
> - Show quoted text -
The webpage does not validate, however the errors are nowhere near the
extra tags in the javascirpt being inserted at the head tag, i.e.
there is an unordered list somewhere in the html that is closed twice
and an incorrect checkbox attribute. The page validates in tidy, with
warnings only. There is this CDATA block around all the javascript
functions, in a comment:
//<![CDATA[
//]]>
It seems to me that the parser is seeing the '</head>' tag in the
javascrpt variable and putting in the end script tag and body tags
Navigation:
[Reply to this message]
|