Sha256: da7798cef4c81da442b5c1ec5363260c166b21b45a03050d960186e81b8a6174

Contents?: true

Size: 352 Bytes

Versions: 1

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

1 entries across 1 versions & 1 rubygems

Version Path
html-pipeline-2.7.1 lib/html/pipeline/plain_text_input_filter.rb