Add nil-check in the tokenizer when emitting a nil-string as character token
This commit is contained in:
@@ -182,6 +182,10 @@
|
||||
|
||||
- (void)emitCharacterTokenWithString:(NSString *)string
|
||||
{
|
||||
if (string == nil) {
|
||||
return;
|
||||
}
|
||||
|
||||
HTMLToken *previousToken = [_tokens lastObject];
|
||||
if ([previousToken isCharacterToken]) {
|
||||
[(HTMLCharacterToken *)previousToken appendString:string];
|
||||
|
||||
Reference in New Issue
Block a user