Sha256: cc43ad3655c71e85dc7132f04c47fed8c41cb7f94b1fdca0d6d1fc52dd43098f

Contents?: true

Size: 340 Bytes

Versions: 11

Compression:

Stored size: 340 Bytes

Contents

module EscapeUtils
  module HtmlSafety
    if "".respond_to? :html_safe?
      def _escape_html(s)
        if s.html_safe?
          s.to_s.html_safe
        else
          EscapeUtils.escape_html(s.to_s).html_safe
        end
      end
    else
      def _escape_html(s)
        EscapeUtils.escape_html(s.to_s)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
escape_utils-1.2.2 lib/escape_utils/html_safety.rb
escape_utils-1.1.1 lib/escape_utils/html_safety.rb
escape_utils-1.2.1 lib/escape_utils/html_safety.rb
escape_utils-1.2.0 lib/escape_utils/html_safety.rb
escape_utils-1.1.0 lib/escape_utils/html_safety.rb
escape_utils-1.0.1 lib/escape_utils/html_safety.rb
escape_utils-1.0.0 lib/escape_utils/html_safety.rb
escape_utils-0.3.2 lib/escape_utils/html_safety.rb
escape_utils-0.3.1 lib/escape_utils/html_safety.rb
escape_utils-0.3.0 lib/escape_utils/html_safety.rb
escape_utils-0.2.4 lib/escape_utils/html_safety.rb