Sha256: e0448811cc3a130ca449da24d08fe122b75f33b36b7eb069e47768ed41af87d6

Contents?: true

Size: 432 Bytes

Versions: 16

Compression:

Stored size: 432 Bytes

Contents

begin
  require "escape_utils"
rescue LoadError => _
  abort "Missing dependency 'escape_utils' for PlainTextInputFilter. See README.md for details."
end

module HTML
  class Pipeline
    # Simple filter for plain text input. HTML escapes the text input and wraps it
    # in a div.
    class PlainTextInputFilter < TextFilter
      def call
        "<div>#{EscapeUtils.escape_html(@text, false)}</div>"
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
html-pipeline-2.2.2 lib/html/pipeline/plain_text_input_filter.rb
html-pipeline-2.2.1 lib/html/pipeline/plain_text_input_filter.rb
html-pipeline-2.2.0 lib/html/pipeline/plain_text_input_filter.rb
html-pipeline-2.1.0 lib/html/pipeline/plain_text_input_filter.rb
html-pipeline-2.0 lib/html/pipeline/plain_text_input_filter.rb
html-pipeline-1.11.0 lib/html/pipeline/plain_text_input_filter.rb
html-pipeline-1.10.0 lib/html/pipeline/plain_text_input_filter.rb
html-pipeline-1.9.0 lib/html/pipeline/plain_text_input_filter.rb
html-pipeline-1.8.0 lib/html/pipeline/plain_text_input_filter.rb
html-pipeline-1.7.0 lib/html/pipeline/plain_text_input_filter.rb
html-pipeline-1.6.0 lib/html/pipeline/plain_text_input_filter.rb
html-pipeline-1.5.0 lib/html/pipeline/plain_text_input_filter.rb
html-pipeline-1.4.0 lib/html/pipeline/plain_text_input_filter.rb
html-pipeline-1.3.0 lib/html/pipeline/plain_text_input_filter.rb
html-pipeline-1.1.0 lib/html/pipeline/plain_text_input_filter.rb
html-pipeline-1.0.0 lib/html/pipeline/plain_text_input_filter.rb