Sha256: a73a1e4d45da5871a3b2a27d339d045d61a78c202b173e9bf3331d071ca038df

Contents?: true

Size: 352 Bytes

Versions: 11

Compression:

Stored size: 352 Bytes

Contents

HTML::Pipeline.require_dependency('escape_utils', 'PlainTextInputFilter')

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

11 entries across 11 versions & 1 rubygems

Version Path
html-pipeline-2.11.0 lib/html/pipeline/plain_text_input_filter.rb
html-pipeline-2.10.0 lib/html/pipeline/plain_text_input_filter.rb
html-pipeline-2.9.2 lib/html/pipeline/plain_text_input_filter.rb
html-pipeline-2.9.1 lib/html/pipeline/plain_text_input_filter.rb
html-pipeline-2.9.0 lib/html/pipeline/plain_text_input_filter.rb
html-pipeline-2.8.4 lib/html/pipeline/plain_text_input_filter.rb
html-pipeline-2.8.3 lib/html/pipeline/plain_text_input_filter.rb
html-pipeline-2.8.2 lib/html/pipeline/plain_text_input_filter.rb
html-pipeline-2.8.1 lib/html/pipeline/plain_text_input_filter.rb
html-pipeline-2.8.0 lib/html/pipeline/plain_text_input_filter.rb
html-pipeline-2.7.2 lib/html/pipeline/plain_text_input_filter.rb