Sha256: 4f937161ffb9853aa5933c17d56a4677bdaa4fae4264138e9b9a7a6d14eb8827

Contents?: true

Size: 1.01 KB

Versions: 50

Compression:

Stored size: 1.01 KB

Contents

# frozen_string_literal: true

require 'haml/template/options'
if defined?(ActiveSupport)
  ActiveSupport.on_load(:action_view) do
    require 'haml/helpers/action_view_mods'
    require 'haml/helpers/action_view_extensions'
  end
else
  require 'haml/helpers/action_view_mods'
  require 'haml/helpers/action_view_extensions'
end
require 'haml/helpers/xss_mods'
require 'haml/helpers/action_view_xss_mods'

module Haml
  class TempleEngine
    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[:escape_html] = true

require 'haml/plugin'

Version data entries

50 entries across 46 versions & 4 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/template.rb
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/haml-5.2.2/lib/haml/template.rb
brakeman-7.0.0 bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/template.rb
brakeman-6.2.2 bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/template.rb
brakeman-6.2.2.rc1 bundle/ruby/3.3.0/gems/haml-5.2.2/lib/haml/template.rb
brakeman-6.2.1 bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/template.rb
brakeman-6.2.0 bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/template.rb
brakeman-6.1.2 bundle/ruby/3.3.0/gems/haml-5.2.2/lib/haml/template.rb
brakeman-6.1.1 bundle/ruby/3.0.0/gems/haml-5.2.2/lib/haml/template.rb
brakeman-6.1.0 bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/template.rb
brakeman-6.0.1 bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/template.rb
brakeman-6.0.0 bundle/ruby/3.0.0/gems/haml-5.2.2/lib/haml/template.rb
brakeman-5.4.1 bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/template.rb
brakeman-5.4.0 bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/template.rb
brakeman-5.3.1 bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/template.rb
brakeman-5.3.0 bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/template.rb
brakeman-5.2.3 bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/template.rb
brakeman-5.2.2 bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/template.rb
brakeman-5.2.1 bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/template.rb
brakeman-5.2.0 bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/template.rb