From 5353ab60cad4620b032edd9f161ee5b645c58f2b Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Sun, 23 May 2010 20:18:11 -0300 Subject: [PATCH] Revert "Revert "concat should check the input if escape or not using SafeBuffer concat method"" This reverts commit 4cee99a3b69cd51d28f4d32e28af851f59724e5f. Signed-off-by: Jeremy Kemper --- lib/rails_xss_helper.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/rails_xss_helper.rb b/lib/rails_xss_helper.rb index c688988..262577e 100644 --- a/lib/rails_xss_helper.rb +++ b/lib/rails_xss_helper.rb @@ -31,6 +31,15 @@ def link_to(*args, &block) module ActionView module Helpers + module TextHelper + def concat(string, unused_binding = nil) + if unused_binding + ActiveSupport::Deprecation.warn("The binding argument of #concat is no longer needed. Please remove it from your views and helpers.", caller) + end + + output_buffer.concat(string) + end + end module TagHelper private def content_tag_string_with_escaping(name, content, options, escape = true)