eval q{use HTML::Scrubber};
error($@) if $@;
# Lists based on http://feedparser.org/docs/html-sanitization.html
- # With html 5 video and audio tags added.
+ # With html5 tags added.
$_scrubber = HTML::Scrubber->new(
allow => [qw{
a abbr acronym address area b big blockquote br br/
menu ol optgroup option p p/ pre q s samp select small
span strike strong sub sup table tbody td textarea
tfoot th thead tr tt u ul var
- video audio
+
+ video audio section nav article aside hgroup header
+ footer time mark
}],
default => [undef, { (
map { $_ => 1 } qw{
selected shape size span start summary
tabindex target title type valign
value vspace width
+
autoplay loopstart loopend end
- playcount controls
+ playcount controls pubdate
} ),
"/" => 1, # emit proper <hr /> XHTML
href => $safe_url_regexp,
(But not in-wiki templates.)
* Version dependency on liburi-perl to >= 1.36; previous versions
did not support building urls from utf-8 strings. Closes: #579713
+ * htmlscrubber: Allow html5 semantic tags: section nav article aside hgroup
+ header footer time mark
-- Joey Hess <joeyh@debian.org> Tue, 27 Apr 2010 12:10:51 -0400
> tag, but something should still be done to replace it.
>
> (BTW, it would be helpful if you could re-merge master into your branch
-> as it is a bit diverged now.) --[[Joey]]
+> as it is a bit diverged now.)
+>
+> Other ideas:
+>
+> * Add pubdate attribute to time elements as appropriate.
+> * Use aside for the sidebar? Or for the [[templates/note]] template?
+> --[[Joey]]
# htmlscrubber.pm needs to not scrub new HTML5 elements
> Most of these can be supported trivially, since they are just semantic
> markup. Make a list of these, and their attributes (and which attributes
> can contain urls or other javascript injection mechanisms), and I can add
-> them. Others, like `embed`, and `canvas` are *scary*. --[[Joey]]
+> them. (Added several now.) Others, like `embed`, and `canvas` are *scary*. --[[Joey]]
# HTML5 Validation and t/html.t