Skip to content
Browse files

Fixed that fragment caching should return a cache hit as html_safe (o…

…r it would all just get escaped) [DHH]
  • Loading branch information...
1 parent 1ddf17d commit 5ea130943eb27586272ecebb060ff1475cadbed6 @dhh dhh committed Jan 7, 2010
Showing with 3 additions and 1 deletion.
  1. +2 −0 actionpack/CHANGELOG
  2. +1 −1 actionpack/lib/action_controller/caching/fragments.rb
View
2 actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*Edge*
+* Fixed that fragment caching should return a cache hit as html_safe (or it would all just get escaped) [DHH]
+
* Added that ActionController::Base now does helper :all instead of relying on the default ApplicationController in Rails to do it [DHH]
* Added ActionDispatch::Request#authorization to access the http authentication header regardless of its proxy hiding [DHH]
View
2 actionpack/lib/action_controller/caching/fragments.rb
@@ -37,7 +37,7 @@ def fragment_cache_key(key)
def fragment_for(buffer, name = {}, options = nil, &block) #:nodoc:
if perform_caching
if fragment_exist?(name,options)
- buffer.concat(read_fragment(name, options))
+ buffer.concat(read_fragment(name, options).html_safe!)
else
pos = buffer.length
block.call

0 comments on commit 5ea1309

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