aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/string/output_safety.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-09-08 20:49:08 +0200
committerJosé Valim <jose.valim@gmail.com>2011-09-08 20:54:30 +0200
commit6b010c2690de9ffce4878a9471c8adb33d4a21a1 (patch)
treeb6f6053d93b64672334701a6ff3d5aae5d41dfa8 /activesupport/lib/active_support/core_ext/string/output_safety.rb
parent0d254915819a9e5711895e410e1597177216c903 (diff)
downloadrails-6b010c2690de9ffce4878a9471c8adb33d4a21a1.tar.gz
rails-6b010c2690de9ffce4878a9471c8adb33d4a21a1.tar.bz2
rails-6b010c2690de9ffce4878a9471c8adb33d4a21a1.zip
Revert removing gsub and sub from safe buffer.
Diffstat (limited to 'activesupport/lib/active_support/core_ext/string/output_safety.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/string/output_safety.rb6
1 files changed, 3 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 f364a42354..4c9609c27a 100644
--- a/activesupport/lib/active_support/core_ext/string/output_safety.rb
+++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb
@@ -75,8 +75,8 @@ end
module ActiveSupport #:nodoc:
class SafeBuffer < String
- UNSAFE_STRING_METHODS = ["capitalize", "chomp", "chop", "delete", "downcase", "lstrip", "next", "reverse", "rstrip", "slice", "squeeze", "strip", "succ", "swapcase", "tr", "tr_s", "upcase"].freeze
- UNAVAILABLE_STRING_METHODS = ["gsub", "sub"]
+ UNSAFE_STRING_METHODS = ["capitalize", "chomp", "chop", "delete", "downcase", "gsub", "lstrip", "next", "reverse", "rstrip", "slice", "squeeze", "strip", "sub", "succ", "swapcase", "tr", "tr_s", "upcase"].freeze
+ UNAVAILABLE_STRING_METHODS = []
alias_method :original_concat, :concat
private :original_concat
@@ -185,4 +185,4 @@ class String
def html_safe
ActiveSupport::SafeBuffer.new(self)
end
-end
+end \ No newline at end of file