aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-06-20 07:01:47 -0700
committerJosé Valim <jose.valim@gmail.com>2011-06-20 07:01:47 -0700
commit81f7bf55c7e15f05015e480505897a82b4038242 (patch)
tree3b784c5a531b8eb48a73f3693be30878cca5b9bc /actionpack/lib
parent89b3293a54f14d4787d79ab275a6492964c7e3e1 (diff)
parentf292f0971f4d3f02ca2aba4aef46666c27199a40 (diff)
downloadrails-81f7bf55c7e15f05015e480505897a82b4038242.tar.gz
rails-81f7bf55c7e15f05015e480505897a82b4038242.tar.bz2
rails-81f7bf55c7e15f05015e480505897a82b4038242.zip
Merge pull request #1785 from medwezys/master
Do not change a frozen text passed to simple_format text helper
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_view/helpers/text_helper.rb1
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