W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 2002

Request: a 'strip-presentation' option

From: Jelks Cabaniss <jelks@jelks.nu>
Date: Sat, 20 Jul 2002 18:25:05 -0400
To: <html-tidy@w3.org>
Cc: <Tidy-develop@lists.sourceforge.net>
Message-ID: <000d01c2303c$4cad44f0$6601a8c0@blackie>

There is, I think, currently only one glaring omission in Tidy.  Many
times, when we only want the *structural* markup, we need to get rid of
**ALL** presentational markup leftovers, including the embedded style
sheet.  Right now, the closest we can come to that is by applying
"clean" and "drop-font-tags", but that leaves droppings like this still
hanging around:

    <style type="text/css">
    /*<![CDATA[*/
 	p.c1 {font-style: italic; text-align: justify}
    /*]]>*/
    </style>

	...

    <p class="c1">...</p>

To get rid of this you have to manually delete the style section and
then do a regex search & replace to get rid of all the 'class=".*"'
attributes.  A 

	strip-presentation: yes/[NO]

option (or similar idea) would be extremely useful.  And rather than
have to set *two* options -- like 'clean' and 'drop-font-tags', which
you currently have to set to get even part of the way there -- it should
be a "one size kills all":  get rid of all FONT & CENTER elements,
ALIGN, BGCOLOR, & BACKGROUND attributes etc., and *not* replacing them
with CLASS attributes and *not* creating an embedded style section.

Thanks,


/Jelks
Received on Saturday, 20 July 2002 18:25:35 GMT

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