Sha256: 9acf8a89fa0b1dd586228e38c9e066c70526255fd75644b5f6e12d2dd899aca9

Contents?: true

Size: 301 Bytes

Versions: 9

Compression:

Stored size: 301 Bytes

Contents

# frozen_string_literal: true

class HTMLPipeline
  class TextFilter
    # Simple filter for plain text input. HTML escapes the text input and wraps it
    # in a div.
    class PlainTextInputFilter < TextFilter
      def call
        "<div>#{CGI.escapeHTML(@text)}</div>"
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
html-pipeline-3.0.3 lib/html_pipeline/text_filter/plain_text_input_filter.rb
html-pipeline-3.0.2 lib/html_pipeline/text_filter/plain_text_input_filter.rb
html-pipeline-3.0.1 lib/html_pipeline/text_filter/plain_text_input_filter.rb
html-pipeline-3.0.0 lib/html_pipeline/text_filter/plain_text_input_filter.rb
html-pipeline-3.0.0.pre6 lib/html_pipeline/text_filter/plain_text_input_filter.rb
html-pipeline-3.0.0.pre5 lib/html_pipeline/text_filter/plain_text_input_filter.rb
html-pipeline-3.0.0.pre3 lib/html_pipeline/text_filter/plain_text_input_filter.rb
html-pipeline-3.0.0.pre2 lib/html_pipeline/text_filter/plain_text_input_filter.rb
html-pipeline-3.0.0.pre1 lib/html_pipeline/text_filter/plain_text_input_filter.rb