Permalink
Browse files

Merge pull request #3123 from avakhov/patch-5-remove-superfluous-to-s

remove superfluous to_s in ERB::Util.html_escape
  • Loading branch information...
spastorino committed Sep 24, 2011
2 parents d54ff41 + f916474 commit 6eaa9f0dadc9c4667d2040dd862b97bc92bdaf19
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/core_ext/string/output_safety.rb
@@ -20,7 +20,7 @@ def html_escape(s)
if s.html_safe?
s
else
- s.to_s.gsub(/&/, "&amp;").gsub(/\"/, "&quot;").gsub(/>/, "&gt;").gsub(/</, "&lt;").html_safe
+ s.gsub(/&/, "&amp;").gsub(/\"/, "&quot;").gsub(/>/, "&gt;").gsub(/</, "&lt;").html_safe
end
end

0 comments on commit 6eaa9f0

Please sign in to comment.