in reply to Seemingly Valid HTML which crashes HTML::TreeBuilder::XPath
I think it's not a bug in either HTML::TreeBuilder, HTML::TreeBuilder::XPath or HTML::Tidy, but more in your expectations of what ->detach_content returns, especially for nodes that only contain text, like the string trololo.
I can't find documentation in HTML::TreeBuilder as to how it represents text nodes, but my guess is that if you receive a non-reference like the string trololo, then you should not call any methods on that.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Seemingly Valid HTML which crashes HTML::TreeBuilder::XPath
by mldvx4 (Friar) on Nov 10, 2023 at 11:38 UTC |