Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 6eaa9f0dadc9c4667d2040dd862b97bc92bdaf19 2 parents d54ff41 + f916474
@spastorino spastorino authored
View
2  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
Please sign in to comment.
Something went wrong with that request. Please try again.