Fix #4657: Hentai-Foundry: Document tree depth limit exceeded.
This commit is contained in:
@@ -5,7 +5,7 @@ module Danbooru
|
|||||||
HTTP::MimeType.register_alias "text/html", :html
|
HTTP::MimeType.register_alias "text/html", :html
|
||||||
|
|
||||||
def decode(str)
|
def decode(str)
|
||||||
Nokogiri::HTML5(str)
|
Nokogiri::HTML5(str, max_tree_depth: -1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -102,5 +102,12 @@ module Sources
|
|||||||
assert_equal(bad_source, Sources::Strategies.normalize_source(bad_source))
|
assert_equal(bad_source, Sources::Strategies.normalize_source(bad_source))
|
||||||
end
|
end
|
||||||
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
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user