Sha256: d52617d8bbe8a18df108a1ddd6426d947a054dca352b0f14b84a27025493b283

Contents?: true

Size: 354 Bytes

Versions: 17

Compression:

Stored size: 354 Bytes

Contents

# frozen_string_literal: true
require 'haml/util'

module Haml
  class Escape < Temple::Filters::Escapable
    def initialize(opts = {})
      super
      @escape_code = options[:escape_code] ||
        "::Haml::Util.escape_html#{options[:use_html_safe] ? '_safe' : ''}((%s))"
      @escaper = eval("proc {|v| #{@escape_code % 'v'} }")
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
haml-6.3.0 lib/haml/escape.rb
haml-6.2.5 lib/haml/escape.rb
haml-6.2.4 lib/haml/escape.rb
haml-6.2.3 lib/haml/escape.rb
haml-6.2.2 lib/haml/escape.rb
haml-6.2.1 lib/haml/escape.rb
haml-6.2.0 lib/haml/escape.rb
haml-6.1.4-java lib/haml/escape.rb
haml-6.1.4 lib/haml/escape.rb
haml-6.1.3-java lib/haml/escape.rb
haml-6.1.3 lib/haml/escape.rb
haml-6.1.2-java lib/haml/escape.rb
haml-6.1.2 lib/haml/escape.rb
haml-6.1.1-java lib/haml/escape.rb
haml-6.1.1 lib/haml/escape.rb
haml-6.1.0-java lib/haml/escape.rb
haml-6.1.0 lib/haml/escape.rb