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...
1 parent 6cb0d35 commit 42c2b24ae79713ad3d78c3ee4ed6de4c25391f0d @spastorino spastorino committed Sep 24, 2011
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 42c2b24

Please sign in to comment.