aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/tag_helper.rb
diff options
context:
space:
mode:
authorMarc Love <marcslove@gmail.com>2009-07-30 03:57:07 -0700
committerYehuda Katz <wycats@gmail.com>2009-07-30 09:48:27 -0700
commitd860c8917023e62d24c239bbc9aa6c629704f416 (patch)
treec4ad597de1a6790fc0b3d0d8a57778de90571d75 /actionpack/lib/action_view/helpers/tag_helper.rb
parentd83b1828577c268de56e1b3942e16002c9efdd57 (diff)
downloadrails-d860c8917023e62d24c239bbc9aa6c629704f416.tar.gz
rails-d860c8917023e62d24c239bbc9aa6c629704f416.tar.bz2
rails-d860c8917023e62d24c239bbc9aa6c629704f416.zip
Fix tag helpers so that all HTML element boolean attributes render according to the specs. Added all boolean attributes listed in the XHTML 1.0 specs (http://www.w3.org/TR/xhtml1/guidelines.html) and HTML 5 specs (http://www.whatwg.org/specs/web-apps/current-work). HTML 5 boolean attribute rendering was broken in commit 1e2d7229602f467cfdc0ef606b5ef8a5566a1501 / [#2864 state:resolved].
Signed-off-by: Yehuda Katz <wycats@gmail.com>
Diffstat (limited to 'actionpack/lib/action_view/helpers/tag_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/tag_helper.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/tag_helper.rb b/actionpack/lib/action_view/helpers/tag_helper.rb
index 66d7592874..eea797abb5 100644
--- a/actionpack/lib/action_view/helpers/tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/tag_helper.rb
@@ -8,7 +8,10 @@ module ActionView
module TagHelper
include ERB::Util
- BOOLEAN_ATTRIBUTES = %w(disabled readonly multiple checked).to_set
+ BOOLEAN_ATTRIBUTES = %w(disabled readonly multiple checked autobuffer
+ autoplay controls loop selected hidden scoped async
+ defer reversed ismap seemless muted required
+ autofocus novalidate formnovalidate open).to_set
BOOLEAN_ATTRIBUTES.merge(BOOLEAN_ATTRIBUTES.map {|attr| attr.to_sym })
# Returns an empty HTML tag of type +name+ which by default is XHTML