From 283133a59cfdb56c24582389eebc80a202f7f52b Mon Sep 17 00:00:00 2001 From: Frankie Roberto Date: Mon, 9 Apr 2012 12:23:46 +0100 Subject: Adding itemscope to list of boolean attributes. '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 --- actionpack/lib/action_view/helpers/tag_helper.rb | 2 +- actionpack/test/template/tag_helper_test.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/actionpack/lib/action_view/helpers/tag_helper.rb b/actionpack/lib/action_view/helpers/tag_helper.rb index 71be2955a8..23777721f6 100644 --- a/actionpack/lib/action_view/helpers/tag_helper.rb +++ b/actionpack/lib/action_view/helpers/tag_helper.rb @@ -14,7 +14,7 @@ module ActionView 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 = { diff --git a/actionpack/test/template/tag_helper_test.rb b/actionpack/test/template/tag_helper_test.rb index 6c325d5abb..32b33b4a55 100644 --- a/actionpack/test/template/tag_helper_test.rb +++ b/actionpack/test/template/tag_helper_test.rb @@ -30,8 +30,8 @@ class TagHelperTest < ActionView::TestCase end def test_tag_options_converts_boolean_option - assert_equal '

', - tag("p", :disabled => true, :multiple => true, :readonly => true) + assert_equal '

', + tag("p", :disabled => true, :itemscope => true, :multiple => true, :readonly => true) end def test_content_tag -- cgit v1.2.3