Class: Redcarpet::Form::Extension::Render::HTML
- Inherits:
-
Render::HTML
- Object
- Render::HTML
- Redcarpet::Form::Extension::Render::HTML
- Defined in:
- lib/redcarpet/form/extension/render/html.rb
Overview
Custom HTML render
Instance Method Summary collapse
Instance Method Details
#paragraph(text) ⇒ Object
17 18 19 |
# File 'lib/redcarpet/form/extension/render/html.rb', line 17 def paragraph(text) (text.strip) end |
#postprocess(document) ⇒ Object
21 22 23 24 25 |
# File 'lib/redcarpet/form/extension/render/html.rb', line 21 def postprocess(document) # Removes unknown/unsafe tags and their children # https://github.com/flavorjones/loofah?tab=readme-ov-file#built-in-html-scrubbers Loofah.fragment(document).scrub!(:prune).to_s end |