From 5ea130943eb27586272ecebb060ff1475cadbed6 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 7 Jan 2010 17:45:32 -0800 Subject: Fixed that fragment caching should return a cache hit as html_safe (or it would all just get escaped) [DHH] --- actionpack/CHANGELOG | 2 ++ actionpack/lib/action_controller/caching/fragments.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 7673b9fe56..1ea0904578 100644 --- a/actionpack/CHANGELOG +++ b/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] diff --git a/actionpack/lib/action_controller/caching/fragments.rb b/actionpack/lib/action_controller/caching/fragments.rb index a0c5ed797e..806e6a1750 100644 --- a/actionpack/lib/action_controller/caching/fragments.rb +++ b/actionpack/lib/action_controller/caching/fragments.rb @@ -37,7 +37,7 @@ 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)) + buffer.concat(read_fragment(name, options).html_safe!) else pos = buffer.length block.call -- cgit v1.2.3