Class: Gollum::Filter::Sanitize
Instance Method Summary
collapse
#initialize
Methods included from Helpers
#trim_leading_slash
Constructor Details
This class inherits a constructor from Gollum::Filter
Instance Method Details
4
5
6
|
# File 'lib/gollum-lib/filter/sanitize.rb', line 4
def (data)
data
end
|
#process(data) ⇒ Object
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/gollum-lib/filter/sanitize.rb', line 8
def process(data)
if @markup.sanitize
doc = Nokogiri::HTML::DocumentFragment.parse(data)
doc = @markup.sanitize.clean_node!(doc)
doc.to_xml(@markup.to_xml_opts)
else
data
end
end
|