From 41e2795d272fa7dfd1995e34ee4be4611cf10d4d Mon Sep 17 00:00:00 2001 From: iska Date: Sun, 1 Mar 2015 23:50:04 +0100 Subject: [PATCH] Add Parser flags initialization and fix flag-name typo --- HTMLKit/HTMLParser.m | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/HTMLKit/HTMLParser.m b/HTMLKit/HTMLParser.m index fa5b390..2d88e86 100644 --- a/HTMLKit/HTMLParser.m +++ b/HTMLKit/HTMLParser.m @@ -34,8 +34,9 @@ HTMLElement *_formElementPointer; BOOL _scriptingFlag; + BOOL _framesetOkFlag; BOOL _fragmentParsingAlgorithm; - BOOL _fosterParting; + BOOL _fosterParenting; } @end @@ -55,6 +56,11 @@ _stackOfOpenElements = [NSMutableArray new]; _tokenizer = [[HTMLTokenizer alloc] initWithString:string]; + + _scriptingFlag = NO; + _framesetOkFlag = YES; + _fragmentParsingAlgorithm = NO; + _fosterParenting = NO; } return self; } @@ -339,7 +345,7 @@ target = overrideTarget; } - if (_fosterParting && matches(target.tagName, @"table", @"tbody", @"tfoot", @"thead", @"tr")) { + if (_fosterParenting && matches(target.tagName, @"table", @"tbody", @"tfoot", @"thead", @"tr")) { HTMLElement *lastTemplate = nil; HTMLElement *lastTable = nil; for (HTMLElement *element in _stackOfOpenElements.reverseObjectEnumerator) {