Sha256: 5babad549784013e782feff7df0abc209c800d93549991ab8bdbd780ec236378

Contents?: true

Size: 655 Bytes

Versions: 4

Compression:

Stored size: 655 Bytes

Contents

# frozen_string_literal: true
module Loofah
  module XML # :nodoc:
    #
    #  Subclass of Nokogiri::XML::DocumentFragment.
    #
    #  See Loofah::ScrubBehavior for additional methods.
    #
    class DocumentFragment < Nokogiri::XML::DocumentFragment
      class << self
        #
        #  Overridden Nokogiri::XML::DocumentFragment
        #  constructor. Applications should use Loofah.fragment to
        #  parse a fragment.
        #
        def parse tags
          doc = Loofah::XML::Document.new
          doc.encoding = tags.encoding.name if tags.respond_to?(:encoding)
          self.new(doc, tags)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 4 rubygems

Version Path
argon-1.3.1 vendor/bundle/ruby/2.7.0/gems/loofah-2.4.0/lib/loofah/xml/document_fragment.rb
symbolic_enum-1.1.5 vendor/bundle/ruby/2.7.0/gems/loofah-2.4.0/lib/loofah/xml/document_fragment.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/loofah-2.4.0/lib/loofah/xml/document_fragment.rb
loofah-2.4.0 lib/loofah/xml/document_fragment.rb