aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/string/output_safety.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-08-31 04:27:59 -0700
committerXavier Noria <fxn@hashref.com>2011-08-31 04:27:59 -0700
commit47b8415bef7edb25bb750685d6f9331f044bbd80 (patch)
treee408066b7c5df43b2e1b2fbc4f0ff5478f5efdab /activesupport/lib/active_support/core_ext/string/output_safety.rb
parent6d772c0953b418da774b2c3bf5cc297508669da7 (diff)
parente746c4047cd34accd7f63aa5d09cbb35011c24e2 (diff)
downloadrails-47b8415bef7edb25bb750685d6f9331f044bbd80.tar.gz
rails-47b8415bef7edb25bb750685d6f9331f044bbd80.tar.bz2
rails-47b8415bef7edb25bb750685d6f9331f044bbd80.zip
Merge branch 'master' of git://github.com/rails/rails
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.rb2
1 files changed, 1 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 6d6c4912bb..f111c8e5a3 100644
--- a/activesupport/lib/active_support/core_ext/string/output_safety.rb
+++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb
@@ -20,7 +20,7 @@ class ERB
if s.html_safe?
s
else
- s.gsub(/[&"><]/) { |special| HTML_ESCAPE[special] }.html_safe
+ s.to_s.gsub(/&/, "&amp;").gsub(/\"/, "&quot;").gsub(/>/, "&gt;").gsub(/</, "&lt;").html_safe
end
end