From 848289589edb74767cb97de9ed37a545a8d8b901 Mon Sep 17 00:00:00 2001 From: Pavel Pravosud Date: Wed, 2 Apr 2014 09:19:50 -0400 Subject: [PATCH] DRY AS::SafeBuffer a bit using existing helper --- .../lib/active_support/core_ext/string/output_safety.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/activesupport/lib/active_support/core_ext/string/output_safety.rb b/activesupport/lib/active_support/core_ext/string/output_safety.rb index db80cfa737..85cc75ff9a 100644 --- a/activesupport/lib/active_support/core_ext/string/output_safety.rb +++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb @@ -171,11 +171,7 @@ def clone_empty %w[concat prepend].each do |method_name| define_method method_name do |value| - if !html_safe? || value.html_safe? - super(value) - else - super(ERB::Util.h(value)) - end + super(html_escape_interpolated_argument(value)) end end alias << concat -- GitLab