Sha256: 64c3007630fdc2426912cc985e707fd241490ac1b8c4d7174dfc02ff2a7ccb93

Contents?: true

Size: 306 Bytes

Versions: 1

Compression:

Stored size: 306 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(text)
        "<div>#{CGI.escapeHTML(text)}</div>"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
html-pipeline-3.1.0 lib/html_pipeline/text_filter/plain_text_input_filter.rb