Skip to content
This repository
Browse code

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
Santiago Pastorino spastorino authored
2  activesupport/lib/active_support/core_ext/string/output_safety.rb
@@ -20,7 +20,7 @@ def html_escape(s)
20 20 if s.html_safe?
21 21 s
22 22 else
23   - s.to_s.gsub(/&/, "&amp;").gsub(/\"/, "&quot;").gsub(/>/, "&gt;").gsub(/</, "&lt;").html_safe
  23 + s.gsub(/&/, "&amp;").gsub(/\"/, "&quot;").gsub(/>/, "&gt;").gsub(/</, "&lt;").html_safe
24 24 end
25 25 end
26 26

0 comments on commit 6eaa9f0

Please sign in to comment.
Something went wrong with that request. Please try again.