Class: Decidim::DiffyExtension::UnescapedHtmlFormatter
- Inherits:
 - 
      Diffy::HtmlFormatter
      
        
- Object
 - Diffy::HtmlFormatter
 - Decidim::DiffyExtension::UnescapedHtmlFormatter
 
 
- Defined in:
 - lib/decidim/diffy_extension.rb
 
Overview
HtmlFormatter that returns basic html output (no inline highlighting) and does not escape HTML tags.
Constant Summary collapse
- TAGS =
          
We exclude the tags ‘del` and `ins` so the diffy styling does not apply.
 (UserInputScrubber.new..to_a - %w(del ins)).freeze
Instance Method Summary collapse
Instance Method Details
#to_s ⇒ Object
      12 13 14 15  | 
    
      # File 'lib/decidim/diffy_extension.rb', line 12 def to_s str = wrap_lines(@diff.map { |line| wrap_line(line) }) ActionView::Base.new(ActionView::LookupContext.new(nil), {}, nil).sanitize(str, tags: TAGS) end  |