Permalink
Browse files

Tiny refactor

  • Loading branch information...
1 parent 321bf95 commit 54117b69615b5b1ba05bd9fcaec5cc66347828de @spastorino spastorino committed Jan 11, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 actionpack/lib/action_view/helpers/output_safety_helper.rb
@@ -28,11 +28,10 @@ def raw(stringish)
# # => "<p>foo</p><br /><p>bar</p>"
#
def safe_join(array, sep=$,)
- sep ||= "".html_safe
- sep = ERB::Util.html_escape(sep)
+ sep = ERB::Util.html_escape(sep || "")
array.map { |i| ERB::Util.html_escape(i) }.join(sep).html_safe
end
end
end
-end
+end

3 comments on commit 54117b6

Contributor

marcandre replied Jan 12, 2012

Actually, the || "" is superfluous...

Owner

spastorino replied Jan 12, 2012

@marcandre you're right html_escape already handles that

Owner

spastorino replied Jan 12, 2012

Fixed 61c5b4a

Please sign in to comment.