aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers/tag_helper.rb
diff options
context:
space:
mode:
authorVipul A M <vipulnsward@gmail.com>2016-06-28 03:18:05 -0700
committerVipul A M <vipulnsward@gmail.com>2016-06-28 03:18:05 -0700
commit940eec417f20e53abd3e3114c7fa845dac0d3a62 (patch)
tree97278baa4fe761e0f129d6e8e8a8c7e715793a67 /actionview/lib/action_view/helpers/tag_helper.rb
parent13a5cc33410bd26be8e7669259b60021fba7012a (diff)
downloadrails-940eec417f20e53abd3e3114c7fa845dac0d3a62.tar.gz
rails-940eec417f20e53abd3e3114c7fa845dac0d3a62.tar.bz2
rails-940eec417f20e53abd3e3114c7fa845dac0d3a62.zip
Bring Boolean Attributes list for AV Tags helper upto speed with current spec.
This is based on https://github.com/kangax/html-minifier/blob/6b2d4536d82819143b468b41a89c700b6c61631f/src/htmlminifier.js#L197 and spec from https://www.w3.org/TR/html51/single-page.html. Couple of other changes to tests due to support update: - autobuffer has been dropped in favour of preload attribute, ref: https://msdn.microsoft.com/en-us/library/ff974743(v=vs.85).aspx - pubdate attribute has been dropped from spec, ref: https://www.w3.org/html/wg/tracker/issues/185
Diffstat (limited to 'actionview/lib/action_view/helpers/tag_helper.rb')
-rw-r--r--actionview/lib/action_view/helpers/tag_helper.rb15
1 files changed, 9 insertions, 6 deletions
diff --git a/actionview/lib/action_view/helpers/tag_helper.rb b/actionview/lib/action_view/helpers/tag_helper.rb
index 09923be568..8ee21fdf38 100644
--- a/actionview/lib/action_view/helpers/tag_helper.rb
+++ b/actionview/lib/action_view/helpers/tag_helper.rb
@@ -11,12 +11,15 @@ module ActionView
include CaptureHelper
include OutputSafetyHelper
- BOOLEAN_ATTRIBUTES = %w(disabled readonly multiple checked autobuffer
- autoplay controls loop selected hidden scoped async
- defer reversed ismap seamless muted required
- autofocus novalidate formnovalidate open pubdate
- itemscope allowfullscreen default inert sortable
- truespeed typemustmatch).to_set
+ BOOLEAN_ATTRIBUTES = %w(allowfullscreen async autofocus autoplay checked
+ compact controls declare default defaultchecked
+ defaultmuted defaultselected defer disabled
+ enabled formnovalidate hidden indeterminate inert
+ ismap itemscope loop multiple muted nohref
+ noresize noshade novalidate nowrap open
+ pauseonexit readonly required reversed scoped
+ seamless selected sortable truespeed typemustmatch
+ visible).to_set
BOOLEAN_ATTRIBUTES.merge(BOOLEAN_ATTRIBUTES.map(&:to_sym))