W3C home > Mailing lists > Public > html-tidy@w3.org > April to June 2008

Re: Output HTML snippets?

From: Arnaud Desitter <arnaud02@users.sourceforge.net>
Date: Fri, 16 May 2008 14:21:06 +0100
Message-ID: <a240ddd00805160621o78ff5724nfaac63a7f1fcf2c3@mail.gmail.com>
To: "CJ Kucera" <pez@apocalyptech.com>
Cc: html-tidy@w3.org

2008/5/15 CJ Kucera <pez@apocalyptech.com>:
>
> 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
> pez@apocalyptech.com   |              demand euphoria!"
> 24.24.2.3171           |                  - Calvin
>
>
>
Received on Friday, 16 May 2008 13:23:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:59 GMT