aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r--activesupport/lib/active_support/core_ext/string/output_safety.rb4
1 files changed, 3 insertions, 1 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 24d0f9319f..231eaedbba 100644
--- a/activesupport/lib/active_support/core_ext/string/output_safety.rb
+++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb
@@ -150,9 +150,11 @@ module ActiveSupport #:nodoc:
else
if html_safe?
new_safe_buffer = super
- unless new_safe_buffer.respond_to?(:frozen?) && new_safe_buffer.frozen?
+
+ if new_safe_buffer
new_safe_buffer.instance_variable_set :@html_safe, true
end
+
new_safe_buffer
else
to_str[*args]