On 10 mrt 2011, Mingli Yuan wrote:
Hi, folks,
I am trying to make a wiki template to render some meta data of an
article.
And I want to use HTML5 Microdata to make these metadate machine-
readable.
But the problem I found is that XHtml Sanitizer in MediaWiki remove
all the attributes needed.
The Microdata spec[1]
...
Above is my personal proposal. Thanks for your
consideration.
Regards,
Mingli
[1]
http://dev.w3.org/html5/md/
Hi Mingli,
When running in HTML5-mode (support added in 1.16.0, enabled by
default) any attribute
starting with "data-" is allowed and will not be stripped.
If $wgHtml5 is set to false [1] then they will be stripped.
There haven't been any new attributes supported that don't use the
data- prefix though, so
things like <el itemprop=""> will not work and stripped in the
sanitizer.
I dont know how final the HTML5 microdata spec is though (it seems to
be marked as a draft)
perhaps we should wait adding new attirbutes untill it's ready ?
A few templates and scripts have already stated using the data-*-
attributes in MediaWiki.
--
Krinkle