feature: allow Loofah-ization of an existing Nokogiri document or fragment #13

flavorjones opened this Issue Jan 22, 2010 · 1 comment


None yet
1 participant

flavorjones commented Jan 22, 2010

Currently, the following code will add scrubbing behavior:

doc = Nokogiri::HTML HTML
doc.extend Loofah::ScrubBehavior::Node

but that doesn't include #text or the node and node set decorators.

So, I'd suggest that we allow Loofah initialize methods to receive a Nokogiri document / fragment and do the extension there. Then we should check that we're not relying on the typeiness of the Loofah document / fragment.

(And, actually, can we then eliminate the classes entirely, and just use extended Nokogiri docs everywhere?)


This comment has been minimized.

Show comment Hide comment

flavorjones Feb 10, 2010


see branch mixin-behavior


flavorjones commented Feb 10, 2010

see branch mixin-behavior

@flavorjones flavorjones added the feature label Nov 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment