diff options
author | Aaron Patterson <tenderlove@github.com> | 2018-09-06 15:00:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-06 15:00:05 -0700 |
commit | b31ae3131a488aca3aac556f8f3ba26499c564e6 (patch) | |
tree | c94d1d8e53114ebde5a6e72339380b694c966447 /activesupport/lib | |
parent | 7fc545365cd219164e361b8e12b0995ca339477e (diff) | |
parent | 1d42a661d8ff7795ebf9255cb7efd17de7b47fb0 (diff) | |
download | rails-b31ae3131a488aca3aac556f8f3ba26499c564e6.tar.gz rails-b31ae3131a488aca3aac556f8f3ba26499c564e6.tar.bz2 rails-b31ae3131a488aca3aac556f8f3ba26499c564e6.zip |
Merge pull request #33808 from itsbagpack/fix-access-safety-buffer-slice
Maintain html_safe? on sliced HTML safe strings
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/string/output_safety.rb | 4 |
1 files changed, 1 insertions, 3 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 f3bdc2977e..d837bb10aa 100644 --- a/activesupport/lib/active_support/core_ext/string/output_safety.rb +++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb @@ -149,9 +149,7 @@ module ActiveSupport #:nodoc: end def [](*args) - if args.size < 2 - super - elsif html_safe? + if html_safe? new_safe_buffer = super if new_safe_buffer |