Sha256: 846d1f19632191de610538a2e2a6c1bd7abfe937dda7bd581fa7134bd3c8abd9

Contents?: true

Size: 267 Bytes

Versions: 20

Compression:

Stored size: 267 Bytes

Contents

require 'action_view'

AutoHtml.add_filter(:simple_format).with({}) do |text, html_options|
  args = [text, {}, {:sanitize => false}]
  begin
    ActionView::Base.new.simple_format(*args) 
  rescue ArgumentError
    # Rails 2 support
    args.pop
    retry
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
auto_html-1.5.1.1 lib/auto_html/filters/simple_format.rb
auto_html-1.6.1 lib/auto_html/filters/simple_format.rb
auto_html-1.6.0 lib/auto_html/filters/simple_format.rb
auto_html-1.5.3 lib/auto_html/filters/simple_format.rb
auto_html-1.5.2 lib/auto_html/filters/simple_format.rb
auto_html-1.5.1 lib/auto_html/filters/simple_format.rb
auto_html-1.5.0 lib/auto_html/filters/simple_format.rb
marcosinger-auto_html-1.3.6 lib/auto_html/filters/simple_format.rb
auto_html-1.4.2 lib/auto_html/filters/simple_format.rb
auto_html-1.4.1 lib/auto_html/filters/simple_format.rb
auto_html-1.4.0 lib/auto_html/filters/simple_format.rb
auto_html-1.3.7 lib/auto_html/filters/simple_format.rb
marcosinger-auto_html-1.3.5 lib/auto_html/filters/simple_format.rb
marcosinger-auto_html-1.3.4 lib/auto_html/filters/simple_format.rb
auto_html-1.3.6 lib/auto_html/filters/simple_format.rb
auto_html-1.3.5 lib/auto_html/filters/simple_format.rb
auto_html-1.3.4 lib/auto_html/filters/simple_format.rb
auto_html-1.3.3 lib/auto_html/filters/simple_format.rb
auto_html-1.3.2 lib/auto_html/filters/simple_format.rb
auto_html-1.3.1 lib/auto_html/filters/simple_format.rb