Class: HTMLPipeline::TextFilter::PlainTextInputFilter
- Inherits:
-
HTMLPipeline::TextFilter
- Object
- Filter
- HTMLPipeline::TextFilter
- HTMLPipeline::TextFilter::PlainTextInputFilter
- Defined in:
- lib/html_pipeline/text_filter/plain_text_input_filter.rb
Overview
Simple filter for plain text input. HTML escapes the text input and wraps it in a div.
Instance Attribute Summary
Attributes inherited from HTMLPipeline::TextFilter
Attributes inherited from Filter
Instance Method Summary collapse
Methods inherited from HTMLPipeline::TextFilter
Methods inherited from Filter
#base_url, call, #has_ancestor?, #initialize, #needs, #validate
Constructor Details
This class inherits a constructor from HTMLPipeline::TextFilter
Instance Method Details
#call(text, context: {}, result: {}) ⇒ Object
8 9 10 |
# File 'lib/html_pipeline/text_filter/plain_text_input_filter.rb', line 8 def call(text, context: {}, result: {}) "<div>#{CGI.escapeHTML(text)}</div>" end |