Skip to content
Browse files

Revert "Don't always mark the argument to #concat as HTML-safe."

This reverts commit e53791f.
  • Loading branch information...
1 parent ab2d7c8 commit 86f028799365dc670c9aeb3386eefb5fceafe433 @jeremy jeremy committed
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 cache = read_fragment(name, options)
- buffer.concat(cache.html_safe)
+ buffer.safe_concat(cache.html_safe)
else
pos = buffer.length
block.call
View
2 actionpack/lib/action_view/helpers/text_helper.rb
@@ -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 << string
+ output_buffer.safe_concat(string)
end
# Truncates a given +text+ after a given <tt>:length</tt> if +text+ is longer than <tt>:length</tt>

0 comments on commit 86f0287

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