diff options
author | Stephen Anderson <stephen@bendycode.com> | 2009-01-06 11:28:40 -0600 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2009-06-09 20:36:45 +1200 |
commit | a94e7d7897a300a95d5d5a00c5efc573b42bcb58 (patch) | |
tree | d28986ca8f36c041f6f3e685f798b9ce566e2529 /actionpack/lib/action_view/helpers | |
parent | a14df8c9b26b489f1db8fba64c72da3f20af7fcd (diff) | |
download | rails-a94e7d7897a300a95d5d5a00c5efc573b42bcb58.tar.gz rails-a94e7d7897a300a95d5d5a00c5efc573b42bcb58.tar.bz2 rails-a94e7d7897a300a95d5d5a00c5efc573b42bcb58.zip |
Sanitized the id generated by text_area_tag helper method. text_area_tag('item[description]') should return: <textarea id="item_description" name="item[description]"></textarea> instead of: <textarea id="item[description]" name="item[description]"></textarea> The old id was causing HTML validation failures.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_tag_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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. |