aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorVipul A M <vipulnsward@gmail.com>2016-06-28 02:48:23 -0700
committerVipul A M <vipulnsward@gmail.com>2016-06-28 02:48:23 -0700
commit6f4719d91a000d7054862796b79a51f8fc548f1a (patch)
treec3a78230a86aefcdb0561da1422db2669ba1e468 /actionview
parent13a5cc33410bd26be8e7669259b60021fba7012a (diff)
downloadrails-6f4719d91a000d7054862796b79a51f8fc548f1a.tar.gz
rails-6f4719d91a000d7054862796b79a51f8fc548f1a.tar.bz2
rails-6f4719d91a000d7054862796b79a51f8fc548f1a.zip
Freeze string for default content for tag_strings, which later goes on to create new content. This should also be inline with content being passed should not be mutable
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/helpers/tag_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/tag_helper.rb b/actionview/lib/action_view/helpers/tag_helper.rb
index 09923be568..57bfa01568 100644
--- a/actionview/lib/action_view/helpers/tag_helper.rb
+++ b/actionview/lib/action_view/helpers/tag_helper.rb
@@ -41,7 +41,7 @@ module ActionView
if VOID_ELEMENTS.include?(name) && content.nil?
"<#{name.to_s.dasherize}#{tag_options(options, escape_attributes)}>".html_safe
else
- content_tag_string(name.to_s.dasherize, content || '', options, escape_attributes)
+ content_tag_string(name.to_s.dasherize, content || ''.freeze, options, escape_attributes)
end
end