Sha256: 79b2ca58a9445072f6906012a75cd5b48db634f38bfea0d68cf3525fe1657496

Contents?: true

Size: 869 Bytes

Versions: 6

Compression:

Stored size: 869 Bytes

Contents

require 'haml/template/options'
require 'haml/engine'
require 'haml/helpers/action_view_mods'
require 'haml/helpers/action_view_extensions'
require 'haml/helpers/xss_mods'

module Haml
  class Compiler
    def precompiled_method_return_value_with_haml_xss
      "::Haml::Util.html_safe(#{precompiled_method_return_value_without_haml_xss})"
    end
    alias_method :precompiled_method_return_value_without_haml_xss, :precompiled_method_return_value
    alias_method :precompiled_method_return_value, :precompiled_method_return_value_with_haml_xss
  end

  module Helpers
    include Haml::Helpers::XssMods
  end

  module Util
    undef :rails_xss_safe? if defined? rails_xss_safe?
    def rails_xss_safe?; true; end
  end

end


Haml::Template.options[:ugly]        = !Rails.env.development?
Haml::Template.options[:escape_html] = true

require 'haml/template/plugin'

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
haml-3.2.0.rc.3 lib/haml/template.rb
haml-3.2.0.rc.2 lib/haml/template.rb
haml-3.2.0.rc.1 lib/haml/template.rb
haml-3.2.0.beta.3 lib/haml/template.rb
haml-3.2.0.beta.2 lib/haml/template.rb
haml-3.2.0.beta.1 lib/haml/template.rb