Sha256: 5f23f59d8d163d75e2dab6b5962312ab4f2b6f698cb30faa3f4405bfa60745d1

Contents?: true

Size: 425 Bytes

Versions: 7

Compression:

Stored size: 425 Bytes

Contents

# This file contains code based on the EscapeUtils project.  See the file LICENSE-EscapeUtils.txt for details. 
require 'walters'

module Walters
  module HtmlSafety
    if ''.respond_to? :html_safe?
      def walters_escape_html(s)
        if s.html_safe?
          s.to_s.html_safe
        else
          Walters.escape_html(s).html_safe
        end
      end
    else
      include ::Walters::HtmlEscape
    end
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
walters-0.3.0-java lib/walters/html/html_safety.rb
walters-0.3.0 lib/walters/html/html_safety.rb
walters-0.2.0-java lib/walters/html/html_safety.rb
walters-0.2.0 lib/walters/html/html_safety.rb
walters-0.1.1 lib/walters/html/html_safety.rb
walters-0.1.0-java lib/walters/html/html_safety.rb
walters-0.1.0 lib/walters/html/html_safety.rb