From 5ddc597066603875b4e59c811d0d78c84842111c Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 10 Jan 2010 18:13:43 -0800 Subject: Use safe_concat instead of trying to html_safe! what might be a frozen string --- actionpack/lib/action_controller/caching/fragments.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_controller/caching/fragments.rb') diff --git a/actionpack/lib/action_controller/caching/fragments.rb b/actionpack/lib/action_controller/caching/fragments.rb index 806e6a1750..00a7f034d3 100644 --- a/actionpack/lib/action_controller/caching/fragments.rb +++ b/actionpack/lib/action_controller/caching/fragments.rb @@ -36,8 +36,8 @@ module ActionController #:nodoc: def fragment_for(buffer, name = {}, options = nil, &block) #:nodoc: if perform_caching - if fragment_exist?(name,options) - buffer.concat(read_fragment(name, options).html_safe!) + if fragment_exist?(name, options) + buffer.safe_concat(read_fragment(name, options)) else pos = buffer.length block.call -- cgit v1.2.3