diff options
author | Tadas Tamosauskas <tadastoo@yahoo.com> | 2011-06-20 14:51:07 +0100 |
---|---|---|
committer | Tadas Tamosauskas <tadastoo@yahoo.com> | 2011-06-20 14:51:07 +0100 |
commit | f292f0971f4d3f02ca2aba4aef46666c27199a40 (patch) | |
tree | a91fbd15df72b67a581e8ca36af86b6ce64d4402 /actionpack/lib/action_view | |
parent | b7c8e0bb0c70070d6fa28e3da1566e0ffaf27704 (diff) | |
download | rails-f292f0971f4d3f02ca2aba4aef46666c27199a40.tar.gz rails-f292f0971f4d3f02ca2aba4aef46666c27199a40.tar.bz2 rails-f292f0971f4d3f02ca2aba4aef46666c27199a40.zip |
Do not change a frozen text passed to simple_format text helper
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/helpers/text_helper.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb index 4be95d8f7e..ae71ade588 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionpack/lib/action_view/helpers/text_helper.rb @@ -256,6 +256,7 @@ module ActionView # # => "<p><span>I'm allowed!</span> It's true.</p>" def simple_format(text, html_options={}, options={}) text = '' if text.nil? + text = text.dup if text.frozen? start_tag = tag('p', html_options, true) text = sanitize(text) unless options[:sanitize] == false text = text.to_str |