* Allow html5 video and audio tags and their attributes in the htmlscrubber.

master
Joey Hess 2007-11-18 13:34:06 -05:00
parent d00e8d78c8
commit e016a975c4
2 changed files with 5 additions and 0 deletions

View File

@ -21,6 +21,7 @@ sub scrubber { #{{{
eval q{use HTML::Scrubber}; eval q{use HTML::Scrubber};
error($@) if $@; error($@) if $@;
# Lists based on http://feedparser.org/docs/html-sanitization.html # Lists based on http://feedparser.org/docs/html-sanitization.html
# With html 5 video and audio tags added.
$_scrubber = HTML::Scrubber->new( $_scrubber = HTML::Scrubber->new(
allow => [qw{ allow => [qw{
a abbr acronym address area b big blockquote br a abbr acronym address area b big blockquote br
@ -30,6 +31,7 @@ sub scrubber { #{{{
menu ol optgroup option p pre q s samp select small menu ol optgroup option p pre q s samp select small
span strike strong sub sup table tbody td textarea span strike strong sub sup table tbody td textarea
tfoot th thead tr tt u ul var tfoot th thead tr tt u ul var
video audio
}], }],
default => [undef, { ( default => [undef, { (
map { $_ => 1 } qw{ map { $_ => 1 } qw{
@ -45,6 +47,8 @@ sub scrubber { #{{{
selected shape size span src start summary selected shape size span src start summary
tabindex target title type usemap valign tabindex target title type usemap valign
value vspace width value vspace width
poster autoplay loopstart loopend end
playcount controls
} ), } ),
"/" => 1, # emit proper <hr /> XHTML "/" => 1, # emit proper <hr /> XHTML
}], }],

1
debian/changelog vendored
View File

@ -23,6 +23,7 @@ ikiwiki (2.13) UNRELEASED; urgency=low
* When usedirs is disabled, link direct to index.html files, not to * When usedirs is disabled, link direct to index.html files, not to
directories, to improve browsing of file:// urls. directories, to improve browsing of file:// urls.
Patch by Daniel Burrows. Closes: #451728 Patch by Daniel Burrows. Closes: #451728
* Allow html5 video and audio tags and their attributes in the htmlscrubber.
-- Joey Hess <joeyh@debian.org> Sat, 17 Nov 2007 19:56:46 -0500 -- Joey Hess <joeyh@debian.org> Sat, 17 Nov 2007 19:56:46 -0500