1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Tiny refactor

This commit is contained in:
Santiago Pastorino 2012-01-11 20:08:43 -02:00
parent 321bf95370
commit 54117b6961

View file

@ -28,11 +28,10 @@ module ActionView #:nodoc:
# # => "<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