Module Loofah
In: lib/loofah/metahelpers.rb
lib/loofah/html5/scrub.rb
lib/loofah/html5/whitelist.rb
lib/loofah/helpers.rb
lib/loofah/elements.rb
lib/loofah/scrubbers.rb
lib/loofah/instance_methods.rb
lib/loofah/html/document.rb
lib/loofah/html/document_fragment.rb
lib/loofah/scrubber.rb
lib/loofah/xml/document.rb
lib/loofah/xml/document_fragment.rb
lib/loofah.rb
RuntimeError ScrubberNotFound Nokogiri::XML::DocumentFragment DocumentFragment Document Document Nokogiri::XML::Document DocumentFragment Nokogiri::HTML::DocumentFragment Nokogiri::HTML::Document Scrubber NoFollow Escape Strip Whitewash NewlineBlockElements Prune Scrubber WhiteListSanitizer FullSanitizer XML Scrub WhiteList HTML5 HTML DocumentDecorator MetaHelpers Elements NodeSet Node ScrubBehavior ClassMethods ActionView Helpers TextBehavior Scrubbers Loofah dot/f_0.png

Strings and IO Objects as Input

Loofah.document and Loofah.fragment accept any IO object in addition to accepting a string. That IO object could be a file, or a socket, or a StringIO, or anything that responds to read and close. Which makes it particularly easy to sanitize mass quantities of docs.

Methods

Classes and Modules

Module Loofah::Elements
Module Loofah::Helpers
Module Loofah::ScrubBehavior
Module Loofah::Scrubbers
Module Loofah::TextBehavior
Class Loofah::Scrubber
Class Loofah::ScrubberNotFound

Constants

VERSION = '1.2.0'   The version of Loofah you are using

Public Class methods

Shortcut for Loofah::HTML::Document.parse This method accepts the same parameters as Nokogiri::HTML::Document.parse

[Source]

# File lib/loofah.rb, line 37
    def document(*args, &block)
      Loofah::HTML::Document.parse(*args, &block)
    end

Shortcut for Loofah::HTML::DocumentFragment.parse This method accepts the same parameters as Nokogiri::HTML::DocumentFragment.parse

[Source]

# File lib/loofah.rb, line 43
    def fragment(*args, &block)
      Loofah::HTML::DocumentFragment.parse(*args, &block)
    end

Shortcut for Loofah.document(string_or_io).scrub!(method)

[Source]

# File lib/loofah.rb, line 53
    def scrub_document(string_or_io, method)
      Loofah.document(string_or_io).scrub!(method)
    end

Shortcut for Loofah.fragment(string_or_io).scrub!(method)

[Source]

# File lib/loofah.rb, line 48
    def scrub_fragment(string_or_io, method)
      Loofah.fragment(string_or_io).scrub!(method)
    end

Shortcut for Loofah.xml_document(string_or_io).scrub!(method)

[Source]

# File lib/loofah.rb, line 75
    def scrub_xml_document(string_or_io, method)
      Loofah.xml_document(string_or_io).scrub!(method)
    end

Shortcut for Loofah.xml_fragment(string_or_io).scrub!(method)

[Source]

# File lib/loofah.rb, line 70
    def scrub_xml_fragment(string_or_io, method)
      Loofah.xml_fragment(string_or_io).scrub!(method)
    end

Shortcut for Loofah::XML::Document.parse This method accepts the same parameters as Nokogiri::XML::Document.parse

[Source]

# File lib/loofah.rb, line 59
    def xml_document(*args, &block)
      Loofah::XML::Document.parse(*args, &block)
    end

Shortcut for Loofah::XML::DocumentFragment.parse This method accepts the same parameters as Nokogiri::XML::DocumentFragment.parse

[Source]

# File lib/loofah.rb, line 65
    def xml_fragment(*args, &block)
      Loofah::XML::DocumentFragment.parse(*args, &block)
    end

[Validate]