aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/form_tag_helper.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2010-05-24 20:13:07 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2010-05-24 20:18:25 -0700
commitd8d38bedfd5716d55e50e85dc6c9a938b1848e66 (patch)
tree59c4fc984eddb4dc809f5a4f0e1d97f431391b33 /actionpack/lib/action_view/helpers/form_tag_helper.rb
parentb5f9c8822dce55b33a4a6ab929f5b86b055a0284 (diff)
downloadrails-d8d38bedfd5716d55e50e85dc6c9a938b1848e66.tar.gz
rails-d8d38bedfd5716d55e50e85dc6c9a938b1848e66.tar.bz2
rails-d8d38bedfd5716d55e50e85dc6c9a938b1848e66.zip
HTML safety: fix textarea with nil content
Diffstat (limited to 'actionpack/lib/action_view/helpers/form_tag_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/form_tag_helper.rb2
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 2a3f826c15..796268628a 100644
--- a/actionpack/lib/action_view/helpers/form_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb
@@ -293,7 +293,7 @@ module ActionView
escape = options.key?("escape") ? options.delete("escape") : true
content = html_escape(content) if escape
- content_tag :textarea, content.html_safe, { "name" => name, "id" => sanitize_to_id(name) }.update(options)
+ content_tag :textarea, content.to_s.html_safe, { "name" => name, "id" => sanitize_to_id(name) }.update(options)
end
# Creates a check box form input tag.