Browse files

Making time_zone_options_for_select return a html_safe string

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
  • Loading branch information...
1 parent bdeeca3 commit 88fc37ff03c0c22764716595815d9c89519406ba @mikel mikel committed with spastorino Aug 15, 2010
View
2 actionpack/lib/action_view/helpers/form_options_helper.rb
@@ -493,7 +493,7 @@ def time_zone_options_for_select(selected = nil, priority_zones = nil, model = :
end
zone_options += options_for_select(convert_zones[zones], selected)
- zone_options
+ zone_options.html_safe
end
private
View
4 actionpack/test/template/form_options_helper_test.rb
@@ -289,6 +289,10 @@ def test_time_zone_options_with_unselected_priority_zones
opts
end
+ def test_time_zone_options_returns_html_safe_string
+ assert time_zone_options_for_select.html_safe?
+ end
+
def test_select
@post = Post.new
@post.category = "<mus>"

0 comments on commit 88fc37f

Please sign in to comment.