Skip to content

Commit b23e478

Browse files
committed
Add support for <video preload=...>, <audio preload=...>
This commit adds "preload" to the set of acceptable attributes on video and audio elements.
1 parent 0d8f72b commit b23e478

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/html5/filters/validator.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ class HTMLConformanceChecker < HTML5::Filters::Base
167167
# <embed> handled separately
168168
'object' => %w[data type usemap height width],
169169
'param' => %w[name value],
170-
'video' => %w[src autoplay start loopstart loopend end loopcount controls poster],
171-
'audio' => %w[src autoplay start loopstart loopend end loopcount controls],
170+
'video' => %w[src autoplay start loopstart loopend end loopcount controls poster preload],
171+
'audio' => %w[src autoplay start loopstart loopend end loopcount controls preload],
172172
'source' => %w[src type media],
173173
'canvas' => %w[height width],
174174
'map' => [],

lib/html5/sanitizer.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ module HTMLSanitizeModule
4545
dir disabled enctype for frame headers height href hreflang hspace id
4646
ismap label lang longdesc loop loopcount loopend loopstart
4747
maxlength media method multiple name nohref
48-
noshade nowrap poster prompt readonly rel rev rows rowspan rules scope
49-
selected shape size span src start style summary tabindex target title
50-
type usemap valign value vspace width xml:lang]
48+
noshade nowrap poster preload prompt readonly rel rev rows rowspan rules
49+
scope selected shape size span src start style summary tabindex target
50+
title type usemap valign value vspace width xml:lang]
5151

5252
MATHML_ATTRIBUTES = Set.new %w[actiontype align close
5353
columnalign columnlines columnspacing columnspan depth display

0 commit comments

Comments
 (0)