summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-05-01 16:34:47 -0400
committerJoey Hess <joey@kitenet.net>2010-05-01 16:34:47 -0400
commit80f2042464f9d14bcaed999e9769c71618bf5252 (patch)
treefde46a93cdbc4a46d2a259f279f0c320e5ac0f94
parenta034716009e29b1ef4bd44e0cddb7f7cf2fd93a2 (diff)
htmlscrubber: Allow html5 semantic tags: section nav article aside hgroup header footer time mark
-rw-r--r--IkiWiki/Plugin/htmlscrubber.pm9
-rw-r--r--debian/changelog2
-rw-r--r--doc/bugs/html5_support.mdwn10
3 files changed, 16 insertions, 5 deletions
diff --git a/IkiWiki/Plugin/htmlscrubber.pm b/IkiWiki/Plugin/htmlscrubber.pm
index 9f40c752f..1604d776a 100644
--- a/IkiWiki/Plugin/htmlscrubber.pm
+++ b/IkiWiki/Plugin/htmlscrubber.pm
@@ -72,7 +72,7 @@ sub scrubber {
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/
@@ -82,7 +82,9 @@ sub scrubber {
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{
@@ -98,8 +100,9 @@ sub scrubber {
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,
diff --git a/debian/changelog b/debian/changelog
index a1bd85bfa..9a6cf68e3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,8 @@ ikiwiki (3.20100428) UNRELEASED; urgency=low
(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
diff --git a/doc/bugs/html5_support.mdwn b/doc/bugs/html5_support.mdwn
index 5d2a41303..a330d3ae6 100644
--- a/doc/bugs/html5_support.mdwn
+++ b/doc/bugs/html5_support.mdwn
@@ -59,7 +59,13 @@ HTML5](http://www.w3.org/TR/html5-diff/).
> 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
@@ -68,7 +74,7 @@ HTML5](http://www.w3.org/TR/html5-diff/).
> 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