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-2.2.6 lib/hobo_support/xss.rb
hobo_support-2.2.5 lib/hobo_support/xss.rb
hobo_support-2.2.4 lib/hobo_support/xss.rb
hobo_support-2.2.3 lib/hobo_support/xss.rb
hobo_support-2.2.2 lib/hobo_support/xss.rb
hobo_support-2.2.1 lib/hobo_support/xss.rb
hobo_support-2.2.0 lib/hobo_support/xss.rb
hobo_support-2.1.2 lib/hobo_support/xss.rb
hobo_support-2.1.1 lib/hobo_support/xss.rb
hobo_support-2.1.0 lib/hobo_support/xss.rb
hobo_support-2.1.0.pre4 lib/hobo_support/xss.rb
hobo_support-2.1.0.pre3 lib/hobo_support/xss.rb
hobo_support-2.1.0.pre2 lib/hobo_support/xss.rb
hobo_support-2.1.0.pre1 lib/hobo_support/xss.rb
hobo_support-2.0.1 lib/hobo_support/xss.rb
hobo_support-2.0.0 lib/hobo_support/xss.rb
hobo_support-2.0.0.pre10 lib/hobo_support/xss.rb
hobo_support-2.0.0.pre9 lib/hobo_support/xss.rb
hobo_support-2.0.0.pre8 lib/hobo_support/xss.rb
hobo_support-1.3.3 lib/hobo_support/xss.rb