Sha256: eb824cfb78add7b24a6f219459ef631277edaaab8e589366052150e2393e81bc

Contents?: true

Size: 298 Bytes

Versions: 62

Compression:

Stored size: 298 Bytes

Contents

require 'active_support/core_ext/string/output_safety'
class Array
  # it always returns an html_safe? string preserving the html_safe?
  # items and separator, excaping the rest
  def safe_join(sep=$,)
    map {|i| ERB::Util.html_escape(i)}.join(ERB::Util.html_escape(sep)).html_safe
  end
end



Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
hobo_support-1.3.0.pre11 lib/hobo_support/xss.rb
hobo_support-1.3.0.pre10 lib/hobo_support/xss.rb