Re: DOMDocument::loadXML() failed when parsing comments inside a script tag
| From: | Raymond Irving | Date: | Tue, 08 Jun 2010 06:50:40 +0000 |
| Subject: | Re: DOMDocument::loadXML() failed when parsing comments inside a script tag | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-305946@lists.php.net to get a copy of this message | ||
Well it actually failed when loadHTML() is used.
The strange thing is that it will fail regardless of the "--" characters:
"Unexpected end tag : strong in Entity"
__
Raymond Irving
On Mon, Jun 7, 2010 at 2:50 PM, Andrew Ballard <aballard@gmail.com> wrote:
> On Mon, Jun 7, 2010 at 3:30 PM, Raymond Irving <xwisdom@gmail.com> wrote:
> > Hi Adam,
> >
> > Thanks for the update but I'm thinking that it would be much easier if
> the
> > DOM parser could just ignore the contents of the <script> tags when
> parsing
> > HTML content. This way we would not have to out JavaScript or force uses
> to
> > add JavaScript to a separate file.
> >
> > What do you think?
> >
> > __
> > Raymond Irving
>
> You didn't tell it to open the contents as HTML; you told it to open
> the contents as XML.
>
> Andrew
>