Sha256: db866a18e80fae39b7654a279b82b0074eebef1a9f3036e45d2e3551b0823add

Contents?: true

Size: 329 Bytes

Versions: 6

Compression:

Stored size: 329 Bytes

Contents

# ~*~ encoding: utf-8 ~*~

class Gollum::Filter::Sanitize < Gollum::Filter
  def extract(d)
    d
  end

  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
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gollum-lib-4.0.3-java lib/gollum-lib/filter/sanitize.rb
gollum-lib-4.0.3 lib/gollum-lib/filter/sanitize.rb
gollum-lib-4.0.2 lib/gollum-lib/filter/sanitize.rb
gollum-lib-4.0.1 lib/gollum-lib/filter/sanitize.rb
gollum-lib-4.0.0 lib/gollum-lib/filter/sanitize.rb
gollum-lib-3.0.0 lib/gollum-lib/filter/sanitize.rb