From dacbcbe55745aa9e5484b10b11f65ccca7db1c54 Mon Sep 17 00:00:00 2001 From: Vasiliy Ermolovich Date: Sat, 21 Jul 2012 13:34:03 +0300 Subject: don't escape options in option_html_attributes method we don't need to escape values in this method as we pass these html attributes to `tag_options` method that handle escaping as well. it fixes the case when we want to pass html5 data options --- actionpack/lib/action_view/helpers/form_options_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_view/helpers/form_options_helper.rb b/actionpack/lib/action_view/helpers/form_options_helper.rb index 72fbbd109a..c88af0355f 100644 --- a/actionpack/lib/action_view/helpers/form_options_helper.rb +++ b/actionpack/lib/action_view/helpers/form_options_helper.rb @@ -711,7 +711,7 @@ module ActionView def option_html_attributes(element) return {} unless Array === element - Hash[element.select { |e| Hash === e }.reduce({}, :merge).map { |k, v| [k, ERB::Util.html_escape(v.to_s)] }] + Hash[element.select { |e| Hash === e }.reduce({}, :merge).map { |k, v| [k, v] }] end def option_text_and_value(option) -- cgit v1.2.3