From: Raymond Irving on
Thanks Nisse. This works great!

I just wish the HTML DOM parser could just ignore the contents of the
<script> tags. It would have made life so much easier for developers working
with the DOM.

Best regards,

__
Raymond Irving

2010/6/7 Nisse Engström <news.NOSPAM.0ixbtqKe(a)luden.se>

>
> In HTML, the "</" sequence closes the <script> element.
> You can escape the "/" character with a backslash:
>
> <strong>Bold Text<\/strong>,Normal Text
>
>
From: Peter Lind on
2010/6/7 Raymond Irving <xwisdom(a)gmail.com>:
> Thanks Nisse. This works great!
>
> I just wish the HTML DOM parser could just ignore the contents of the
> <script> tags. It would have made life so much easier for developers working
> with the DOM.
>

http://www.w3.org/TR/html401/appendix/notes.html#notes-specifying-data

Looks like DOMDocument parses correctly according to the html 4.01
specs (according to the notes for DOMDocument::loadHTML that's the
default doctype). Until HTML 5 is more fixed I would probably prefer
loadHTML() to parse correctly according to the latest fixed html specs
:)

Regards
Peter

--
<hype>
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
BeWelcome/Couchsurfing: Fake51
Twitter: http://twitter.com/kafe15
</hype>