Sha256: 8629c47c69755ded0a8e6fdde1349488796c2dbcfc80b116ef04d5dcc41dd06d

Contents?: true

Size: 335 Bytes

Versions: 37

Compression:

Stored size: 335 Bytes

Contents

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

class Gollum::Filter::Sanitize < Gollum::Filter
  def extract(data)
    data
  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

37 entries across 37 versions & 2 rubygems

Version Path
gitlab-gollum-lib-4.2.7.10.gitlab.2 lib/gollum-lib/filter/sanitize.rb
gitlab-gollum-lib-4.2.7.10.gitlab.1 lib/gollum-lib/filter/sanitize.rb
gitlab-gollum-lib-4.2.7.9 lib/gollum-lib/filter/sanitize.rb
gitlab-gollum-lib-4.2.7.8 lib/gollum-lib/filter/sanitize.rb
gitlab-gollum-lib-4.2.7.7 lib/gollum-lib/filter/sanitize.rb
gitlab-gollum-lib-4.2.7.6 lib/gollum-lib/filter/sanitize.rb
gollum-lib-4.2.10-java lib/gollum-lib/filter/sanitize.rb
gollum-lib-4.2.10 lib/gollum-lib/filter/sanitize.rb
gollum-lib-4.2.9-java lib/gollum-lib/filter/sanitize.rb
gollum-lib-4.2.9 lib/gollum-lib/filter/sanitize.rb
gitlab-gollum-lib-4.2.7.5 lib/gollum-lib/filter/sanitize.rb
gitlab-gollum-lib-4.2.7.4 lib/gollum-lib/filter/sanitize.rb
gitlab-gollum-lib-4.2.7.3 lib/gollum-lib/filter/sanitize.rb
gitlab-gollum-lib-4.2.7.2 lib/gollum-lib/filter/sanitize.rb
gitlab-gollum-lib-4.2.7.1 lib/gollum-lib/filter/sanitize.rb
gitlab-gollum-lib-4.2.7 lib/gollum-lib/filter/sanitize.rb
gollum-lib-4.2.7-java lib/gollum-lib/filter/sanitize.rb
gollum-lib-4.2.7 lib/gollum-lib/filter/sanitize.rb
gollum-lib-5.0.a.3-java lib/gollum-lib/filter/sanitize.rb
gollum-lib-5.0.a.3 lib/gollum-lib/filter/sanitize.rb