Class: Redmine::WikiFormatting::HtmlSanitizer

Inherits:
Object
  • Object
show all
Defined in:
lib/redmine/wiki_formatting/html_sanitizer.rb

Overview

Combination of SanitizationFilter and ExternalLinksFilter

Constant Summary collapse

Pipeline =
HTML::Pipeline.new(
[
  Redmine::WikiFormatting::CommonMark::SanitizationFilter,
  Redmine::WikiFormatting::CommonMark::ExternalLinksFilter,
], {})

Class Method Summary collapse

Class Method Details

.call(html) ⇒ Object



30
31
32
33
# File 'lib/redmine/wiki_formatting/html_sanitizer.rb', line 30

def self.call(html)
  result = Pipeline.call html
  result[:output].to_s
end