Re: Good HTML parser needed
| From: | Shelley | Date: | Tue, 13 May 2008 04:28:43 +0000 |
| Subject: | Re: Good HTML parser needed | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-274220@lists.php.net to get a copy of this message | ||
Maybe I didn't use that tidy correctly.
I don't want html, head, body things. Just parsed string.
On Tue, May 13, 2008 at 12:00 PM, Robert Cummings <robert@interjinn.com>
wrote:
>
> On Tue, 2008-05-13 at 11:34 +0800, Shelley wrote:
> > Hi all,
> >
> > The fact is that I have a site that allow users to post hypertext
> articles.
> > However, I saw that sometimes, because of their careless input,
> > the articles is not rendered correctly.
> >
> > I want to know whether there are some good HTML parsers written in PHP.
> >
> > That is,
> > the parser checks whether html tags like table, tr, td, div, dt, dl, dd,
> > script, ul,
> > li, span, h1, h2, etc. are nested correctly. If any tags not matched,
> just
> > remove them.
>
> http://ca3.php.net/manual/en/book.tidy.php
>
> Cheers,
> Rob.
> --
> http://www.interjinn.com
> Application and Templating Framework for PHP
>
>
--
Regards,
Shelley