Skip to content
This repository
Browse code

Use safe_concat instead of trying to html_safe! what might be a froze…

…n string
  • Loading branch information...
commit 5ddc597066603875b4e59c811d0d78c84842111c 1 parent d2e7c1b
David Heinemeier Hansson authored January 10, 2010
4  actionpack/lib/action_controller/caching/fragments.rb
@@ -36,8 +36,8 @@ def fragment_cache_key(key)
36 36
 
37 37
       def fragment_for(buffer, name = {}, options = nil, &block) #:nodoc:
38 38
         if perform_caching
39  
-          if fragment_exist?(name,options)
40  
-            buffer.concat(read_fragment(name, options).html_safe!)
  39
+          if fragment_exist?(name, options)
  40
+            buffer.safe_concat(read_fragment(name, options))
41 41
           else
42 42
             pos = buffer.length
43 43
             block.call

0 notes on commit 5ddc597

Please sign in to comment.
Something went wrong with that request. Please try again.