Module: Decidim::SanitizeHelper

Includes:
ActionView::Helpers::SanitizeHelper
Included in:
TraceabilityHelper
Defined in:
app/helpers/decidim/sanitize_helper.rb

Overview

Helper that provides methods to render order selector and links

Instance Method Summary collapse

Instance Method Details

#decidim_sanitize(html) ⇒ Object

Public: It sanitizes a user-inputted string with the ‘Decidim::UserInputScrubber` scrubber, so that video embeds work as expected. Uses Rails’ ‘sanitize` internally.

html - A string representing user-inputted HTML.

Returns an HTML-safe String.



15
16
17
# File 'app/helpers/decidim/sanitize_helper.rb', line 15

def decidim_sanitize(html)
  sanitize(html, scrubber: Decidim::UserInputScrubber.new)
end