Sha256: 3c8f8a743239869b53b46c18e6e21fcc7243f371d87deb6061a6f24ccb9d98d4

Contents?: true

Size: 585 Bytes

Versions: 65

Compression:

Stored size: 585 Bytes

Contents

module Haml

  class ErubisTemplateHandler < ActionView::Template::Handlers::Erubis

    def initialize(*args, &blk)
      @newline_pending = 0
      super
    end
  end

  class SafeErubisTemplate < Tilt::ErubisTemplate

    def initialize_engine
    end

    def prepare
      @options.merge! :engine_class => Haml::ErubisTemplateHandler
      super
    end

    def precompiled_preamble(locals)
      [super, "@output_buffer = ActionView::OutputBuffer.new;"].join("\n")
    end

    def precompiled_postamble(locals)
      [super, '@output_buffer.to_s'].join("\n")
    end
  end
end

Version data entries

65 entries across 57 versions & 10 rubygems

Version Path
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/helpers/safe_erubis_template.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/brakeman-4.5.1/bundle/ruby/2.5.0/gems/haml-4.0.7/lib/haml/helpers/safe_erubis_template.rb
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/helpers/safe_erubis_template.rb
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/brakeman-4.5.1/bundle/ruby/2.5.0/gems/haml-4.0.7/lib/haml/helpers/safe_erubis_template.rb
zuora_connect_ui-0.9.1 vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/helpers/safe_erubis_template.rb
zuora_connect_ui-0.9.1 vendor/ruby/2.6.0/gems/brakeman-4.5.1/bundle/ruby/2.5.0/gems/haml-4.0.7/lib/haml/helpers/safe_erubis_template.rb
zuora_connect_ui-0.9.0 vendor/ruby/2.6.0/gems/brakeman-4.5.1/bundle/ruby/2.5.0/gems/haml-4.0.7/lib/haml/helpers/safe_erubis_template.rb
zuora_connect_ui-0.9.0 vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/helpers/safe_erubis_template.rb
zuora_connect_ui-0.8.3 vendor/ruby/2.6.0/gems/brakeman-4.5.1/bundle/ruby/2.5.0/gems/haml-4.0.7/lib/haml/helpers/safe_erubis_template.rb
zuora_connect_ui-0.8.3 vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/helpers/safe_erubis_template.rb
zuora_connect_ui-0.8.2 vendor/ruby/2.6.0/gems/brakeman-4.5.1/bundle/ruby/2.5.0/gems/haml-4.0.7/lib/haml/helpers/safe_erubis_template.rb
zuora_connect_ui-0.8.2 vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/helpers/safe_erubis_template.rb
zuora_connect_ui-0.8.1 vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/helpers/safe_erubis_template.rb
zuora_connect_ui-0.8.1 vendor/ruby/2.6.0/gems/brakeman-4.5.1/bundle/ruby/2.5.0/gems/haml-4.0.7/lib/haml/helpers/safe_erubis_template.rb
zuora_connect_ui-0.8.0 vendor/ruby/2.6.0/gems/brakeman-4.5.1/bundle/ruby/2.5.0/gems/haml-4.0.7/lib/haml/helpers/safe_erubis_template.rb
zuora_connect_ui-0.8.0 vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/helpers/safe_erubis_template.rb
brakeman-4.6.1 bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/helpers/safe_erubis_template.rb
brakeman-4.6.0 bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/helpers/safe_erubis_template.rb
zuora_connect_ui-0.7.1 vendor/ruby/2.6.0/gems/brakeman-4.5.1/bundle/ruby/2.5.0/gems/haml-4.0.7/lib/haml/helpers/safe_erubis_template.rb
zuora_connect_ui-0.7.0 vendor/ruby/2.6.0/gems/brakeman-4.5.1/bundle/ruby/2.5.0/gems/haml-4.0.7/lib/haml/helpers/safe_erubis_template.rb