Hi, Krinkle,
Thanks for your reply.
Agree with you that Microdata is not mature enough so far, and we should wait for it.
And I will try the custom data-* attribute, although in this way I will lose generality and other tooling support, it is still work for my project.
Thanks for you help.
Regards, Mingli
On Fri, Mar 11, 2011 at 1:16 AM, Krinkle krinklemail@gmail.com wrote:
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
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
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l