Sha256: 64e95afc18c927169c3e8b94ee13c2e548f50f46c9ca8ee8b73597dfc50c7ffb
Contents?: true
Size: 679 Bytes
Versions: 8
Compression:
Stored size: 679 Bytes
Contents
# frozen_string_literal: true module Decidim # Helper that provides methods to render order selector and links module SanitizeHelper include ActionView::Helpers::SanitizeHelper # 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. def decidim_sanitize(html) sanitize(html, scrubber: Decidim::UserInputScrubber.new) end def decidim_html_escape(text) ERB::Util.unwrapped_html_escape(text.to_str) end end end
Version data entries
8 entries across 8 versions & 1 rubygems