Skip to content

Commit

Permalink
Corrected namespace tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jhy committed Dec 17, 2023
1 parent 5e0b048 commit d5bc100
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/jsoup/parser/HtmlTreeBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ Element getFromStack(String elName) {
final int upper = bottom >= maxQueueDepth ? bottom - maxQueueDepth : 0;
for (int pos = bottom; pos >= upper; pos--) {
Element next = stack.get(pos);
if (next.elementIs(elName, next.tag().namespace())) {
if (next.elementIs(elName, NamespaceHtml)) {
return next;
}
}
Expand All @@ -488,7 +488,7 @@ boolean removeFromStack(Element el) {
Element popStackToClose(String elName) {
for (int pos = stack.size() -1; pos >= 0; pos--) {
Element el = pop();
if (el.elementIs(elName, el.tag().namespace())) {
if (el.elementIs(elName, NamespaceHtml)) {
return el;
}
}
Expand Down
Binary file added src/test/resources/fuzztests/65147.html.gz
Binary file not shown.

0 comments on commit d5bc100

Please sign in to comment.