diff options
author | r7kamura <r7kamura@gmail.com> | 2019-04-18 17:44:22 +0900 |
---|---|---|
committer | r7kamura <r7kamura@gmail.com> | 2019-04-19 06:32:55 +0900 |
commit | 9dd254c2a20b393d68c9db4b17a15a672e2a2c16 (patch) | |
tree | ce7a58117e7bd4936ea2c1993eb9b1f085796ac9 /activesupport/lib/active_support | |
parent | 98a75b46468c45d4477949ed267bb8823297d815 (diff) | |
download | rails-9dd254c2a20b393d68c9db4b17a15a672e2a2c16.tar.gz rails-9dd254c2a20b393d68c9db4b17a15a672e2a2c16.tar.bz2 rails-9dd254c2a20b393d68c9db4b17a15a672e2a2c16.zip |
Preserve html_safe? status on ActiveSupport::SafeBuffer#*
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/core_ext/string/output_safety.rb | 6 |
1 files changed, 6 insertions, 0 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 638152626b..645b1fea17 100644 --- a/activesupport/lib/active_support/core_ext/string/output_safety.rb +++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb @@ -213,6 +213,12 @@ module ActiveSupport #:nodoc: dup.concat(other) end + def *(*) + new_safe_buffer = super + new_safe_buffer.instance_variable_set(:@html_safe, @html_safe) + new_safe_buffer + end + def %(args) case args when Hash |