Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't always mark the argument to #concat as HTML-safe.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information
nex3 authored and jeremy committed May 23, 2010
1 parent 48fbe7b commit e53791f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/caching/fragments.rb
Expand Up @@ -37,7 +37,7 @@ def fragment_cache_key(key)
def fragment_for(buffer, name = {}, options = nil, &block) #:nodoc:
if perform_caching
if cache = read_fragment(name, options)
buffer.safe_concat(cache.html_safe)
buffer.concat(cache.html_safe)
else
pos = buffer.length
block.call
Expand Down
2 changes: 1 addition & 1 deletion actionpack/lib/action_view/helpers/text_helper.rb
Expand Up @@ -29,7 +29,7 @@ def concat(string, unused_binding = nil)
ActiveSupport::Deprecation.warn("The binding argument of #concat is no longer needed. Please remove it from your views and helpers.", caller)
end

output_buffer.safe_concat(string)
output_buffer << string
end

# Truncates a given +text+ after a given <tt>:length</tt> if +text+ is longer than <tt>:length</tt>
Expand Down

0 comments on commit e53791f

Please sign in to comment.