From a94e7d7897a300a95d5d5a00c5efc573b42bcb58 Mon Sep 17 00:00:00 2001 From: Stephen Anderson Date: Tue, 6 Jan 2009 11:28:40 -0600 Subject: Sanitized the id generated by text_area_tag helper method. text_area_tag('item[description]') should return: instead of: The old id was causing HTML validation failures. Signed-off-by: Michael Koziarski --- actionpack/lib/action_view/helpers/form_tag_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_view/helpers') diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb index e44ad80068..8ab78e7bc6 100644 --- a/actionpack/lib/action_view/helpers/form_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb @@ -258,7 +258,7 @@ module ActionView options["cols"], options["rows"] = size.split("x") if size.respond_to?(:split) end - content_tag :textarea, content, { "name" => name, "id" => name }.update(options.stringify_keys) + content_tag :textarea, content, { "name" => name, "id" => sanitize_to_id(name) }.update(options.stringify_keys) end # Creates a check box form input tag. -- cgit v1.2.3