Pass block to document fragment instantiation #282
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi! I recently ran into a bizarre issue where some HTML I'm sanitizing was so deeply nested, that Nokogiri was silently failing with this error (
#<Nokogiri::XML::SyntaxError: 1153:513: FATAL: Excessive depth in document: 256 use XML_PARSE_HUGE option>
) and simply returning empty tags.I'm looking into ways to potentially mitigate receiving HTML this deeply nested, but it also seems like it would be great if I could pass this option to Nokogiri to parse the HTML without losing a bunch of data.
I'm unsure if this would be the preferred way to introduce passing options from Loofah directly to Nokogiri, or if adding this sort of capability is something Loofah even wants to do, but I figured this would be a smaller change than adding an additional argument.
Anyway, thanks for all the work y'all do on this project. The company I work for has been using this for many years, and it continues to serve us well!