[MKDoc-modules] Re: [FEATURE REQ] XHTML whitelist of elements and attributes

Paul Arzul patricka at mkdoc.com
Thu Sep 25 13:13:43 BST 2003


On Fri 16-May-2003 at 05:14:15PM +0100, Chris Croome wrote:
> Hi
> 
> Whitelist wishlist...
> 
> Allowed HTML in the body of a document, excluding Javascript and CSS and
> deprecated things and XHML things.

okay, i've had a closer look at this list by doing a diff with the xhtml
1.0 transitional list i did.

things i've noticed are:

you're using the xml:space attribute for code, kbd and tt -- none of
which appear valid?

other odd ones are:

- optgroup multiple name size tabindex
- option multiple size tabindex
- dfn datetime
- input ismap

i think those are all typos and can go. important things that are
missing are:

- label accesskey
- optgroup label
- option label

and also perhaps align, char, and charoff on a various table elements.
it's hard to read diffs with all the extra fluff -- maybe i've missed
more. :(

would is be simpler to use one of the xhtml lists (say transitional) and
specifically disallow elements we don't want?

---8<---

use strict;
use warnings;

use MKDoc::XML::Stripper;

my $stripper = new MKDoc::XML::Stripper;

# $stripper->load_def('mkdoc16');
$stripper->load_def('xhtml10transitional.txt');

$stripper->disallow(head);
$stripper->disallow(script);
$stripper->disallow(style);
# etc...

--->8---

- p



More information about the MKDoc-modules mailing list