Re: Output HTML snippets?

"Arnaud Desitter" <[email protected]>
Newsgroups gmane.comp.web.html-tidy.user
Message-ID <[email protected]>
2008/5/15 CJ Kucera <[email protected]>:
>
> Hello - I'd like to use HTML Tidy to sanitize some snippets of HTML, but
> ideally I'd like it to only fix problems with the given text, without
> outputting a whole HTML document, if possible.
>
> So, if it were fed the following:
>
>   <i>Here's an unclosed tag
>
> It'd just ouput this:
>
>   <i>Here's an unclosed tag</i>
>
> .... instead of outputting a whole HTML document.  I've dug through the
> available options a few times but haven't seen anything; I'm wondering
> if that's just Not Possible.  If anyone's got ideas, I'd appreciate 'em.
>
> As a bit of background, this is for a little web-based RSS aggregator -
> often feeds will have some seriously malformed HTML which needs to be
> fixed, but it shouldn't really have full <html> tags, etc.

Try;
http://tidy.sourceforge.net/docs/quickref.html#show-body-only

Regards,

>
> Thanks!
>
> -CJ
>
> --
> WOW: Flemmy            |   "Happiness isn't good enough for me!  I
> [email protected]   |              demand euphoria!"
> 24.24.2.3171           |                  - Calvin
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.