W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 2007

Re: Is it possible to whitelist tags?

From: Arnaud Desitter <arnaud02@users.sourceforge.net>
Date: Tue, 20 Nov 2007 09:00:21 +0000
Message-ID: <a240ddd00711200100v373fa65bn8f7cd3ab89e917e4@mail.gmail.com>
To: "Dionysis Zindros" <dionyziz@gmail.com>
Cc: html-tidy@w3.org

On 19/11/2007, Dionysis Zindros <dionyziz@gmail.com> wrote:
> I'm developing an application using TidyLib and C++. I want to tidy up
> certain HTML code, but I want to whitelist certain tags. e.g. I would
> only like to allow <strong>, <ul>, and <li>, but not <table>, <tr>,
> <td>, <script>, and so forth.
> If that isn't possible, would it be possible to do some kind of
> blacklisting instead?
> Also, one last question: Is it possible to use a similar mechanism to
> whitelist/blacklist attributes on particular properties? For example,
> I might want to allow the attribute "name", but not the attribute
> "class" for "input" tags. How would one go about doing that?
> Thank you a lot in advance,
> Dionysis.

There is no such mechanism in tidy although adding one should be relatively

Received on Tuesday, 20 November 2007 09:01:19 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:56 UTC