Fix #4657: Hentai-Foundry: Document tree depth limit exceeded.

This commit is contained in:
evazion
2021-01-06 03:05:36 -06:00
parent 886e43ad11
commit 65be2c99b0
2 changed files with 8 additions and 1 deletions

View File

@@ -5,7 +5,7 @@ module Danbooru
HTTP::MimeType.register_alias "text/html", :html
def decode(str)
Nokogiri::HTML5(str)
Nokogiri::HTML5(str, max_tree_depth: -1)
end
end
end

View File

@@ -102,5 +102,12 @@ module Sources
assert_equal(bad_source, Sources::Strategies.normalize_source(bad_source))
end
end
context "a post with a deeply nested commentary" do
should "work" do
@source = Sources::Strategies.find("https://hentai-foundry.com/pictures/user/LumiNyu/867562/Mona-patreon-winner")
assert_nothing_raised { @source.to_h }
end
end
end
end