tweak handling of parser abort

This commit is contained in:
Richard Frith-Macdonald 2022-12-09 10:23:14 +00:00
parent 1cb6ef8572
commit 91108c69c3
2 changed files with 17 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2022-12-09 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSXMLParser.m: do not process end tag if parsing was aborted
while processing start tag.
2022-11-29 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSHTTPURLHandle.m: Use the https_proxy and http_proxy

View file

@ -1559,7 +1559,12 @@ NSLog(@"_processTag <%@%@ %@>", flag?@"/": @"", tag, attributes);
[self _processTag: tag
isEnd: NO
withAttributes: attributes];
[self _processTag: tag isEnd: YES withAttributes: nil];
if (NO == this->abort)
{
[self _processTag: tag
isEnd: YES
withAttributes: nil];
}
break;
}
@ -1597,9 +1602,12 @@ NSLog(@"_processTag <%@%@ %@>", flag?@"/": @"", tag, attributes);
}
if (c == '>')
{
[self _processTag: tag
isEnd: (*addr(tp) == '/')
withAttributes: attributes];
if (NO == this->abort)
{
[self _processTag: tag
isEnd: (*addr(tp) == '/')
withAttributes: attributes];
}
break;
}
/* get next argument (eats up to /, ?, >, =, space)