class Spirit::Render::Processors::SanitizeProcessor
Encapsulates sanitization options. @see github.com/github/gollum/blob/master/lib/gollum/sanitization.rb
Constants
- ADD_ATTRIBUTES
attributes to add to elements
- ATTRIBUTES
white-listed attributes
- ELEMENTS
white-listed elements
- PROTOCOLS
white-listed protocols
- REMOVE_CONTENTS
elements to remove (incl. contents)
Public Class Methods
config()
click to toggle source
# File lib/spirit/render/processors/sanitize_processor.rb, line 65 def self.config { elements: ELEMENTS.dup, attributes: ATTRIBUTES.dup, protocols: PROTOCOLS.dup, add_attributes: ADD_ATTRIBUTES.dup, remove_contents: REMOVE_CONTENTS.dup, allow_comments: false } end
Public Instance Methods
clean(document)
click to toggle source
# File lib/spirit/render/processors/sanitize_processor.rb, line 78 def clean(document) sanitizer.clean document end