Skip to content

Commit

Permalink
Adding itemscope to list of boolean attributes.
Browse files Browse the repository at this point in the history
'itemscope' is defined within HTML5 for use in microdata markup. See
http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.ht
ml#attr-itemscope
  • Loading branch information
frankieroberto committed Apr 9, 2012
1 parent 4c1dcb0 commit 283133a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion actionpack/lib/action_view/helpers/tag_helper.rb
Expand Up @@ -14,7 +14,7 @@ module TagHelper
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 pubdate).to_set
autofocus novalidate formnovalidate open pubdate itemscope).to_set
BOOLEAN_ATTRIBUTES.merge(BOOLEAN_ATTRIBUTES.map {|attribute| attribute.to_sym })

PRE_CONTENT_STRINGS = {
Expand Down
4 changes: 2 additions & 2 deletions actionpack/test/template/tag_helper_test.rb
Expand Up @@ -30,8 +30,8 @@ def test_tag_options_accepts_blank_option
end

def test_tag_options_converts_boolean_option
assert_equal '<p disabled="disabled" multiple="multiple" readonly="readonly" />',
tag("p", :disabled => true, :multiple => true, :readonly => true)
assert_equal '<p disabled="disabled" itemscope="itemscope" multiple="multiple" readonly="readonly" />',
tag("p", :disabled => true, :itemscope => true, :multiple => true, :readonly => true)
end

def test_content_tag
Expand Down

0 comments on commit 283133a

Please sign in to comment.