mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Mark scrub as an unsafe method on SafeBuffer
This commit is contained in:
parent
38998af1d9
commit
4cb20843eb
2 changed files with 2 additions and 1 deletions
|
@ -134,7 +134,7 @@ module ActiveSupport #:nodoc:
|
||||||
class SafeBuffer < String
|
class SafeBuffer < String
|
||||||
UNSAFE_STRING_METHODS = %w(
|
UNSAFE_STRING_METHODS = %w(
|
||||||
capitalize chomp chop delete delete_prefix delete_suffix
|
capitalize chomp chop delete delete_prefix delete_suffix
|
||||||
downcase lstrip next reverse rstrip slice squeeze strip
|
downcase lstrip next reverse rstrip scrub slice squeeze strip
|
||||||
succ swapcase tr tr_s unicode_normalize upcase
|
succ swapcase tr tr_s unicode_normalize upcase
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -88,6 +88,7 @@ class SafeBufferTest < ActiveSupport::TestCase
|
||||||
next: nil,
|
next: nil,
|
||||||
reverse: nil,
|
reverse: nil,
|
||||||
rstrip: nil,
|
rstrip: nil,
|
||||||
|
scrub: nil,
|
||||||
slice: "foo",
|
slice: "foo",
|
||||||
squeeze: nil,
|
squeeze: nil,
|
||||||
strip: nil,
|
strip: nil,
|
||||||
|
|
Loading…
Reference in a new issue