From c37ad247517956ebf43434c336f2b31995eb8d18 Mon Sep 17 00:00:00 2001 From: iska Date: Sun, 1 Mar 2015 23:56:20 +0100 Subject: [PATCH] Add method generic-parsing-algorithm-for-token when encountering certain "text"-elements https://html.spec.whatwg.org/multipage/syntax.html#generic-rcdata-element-parsing-algorithm --- HTMLKit/HTMLParser.m | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/HTMLKit/HTMLParser.m b/HTMLKit/HTMLParser.m index 06abf5c..b7d0cd3 100644 --- a/HTMLKit/HTMLParser.m +++ b/HTMLKit/HTMLParser.m @@ -414,6 +414,15 @@ #warning Implement inserting string into node (https://html.spec.whatwg.org/multipage/syntax.html#insert-a-character) } } + +- (void)applyGenericParsingAlgorithmForToken:(HTMLStartTagToken *)token withTokenizerState:(HTMLTokenizerState)state +{ + [self insertElementForToken:token]; + _tokenizer.state = state; + _originalInsertionMode = _insertionMode; + [self switchInsertionMode:HTMLInsertionModeText]; +} + #pragma mark - Insertion Modes - (void)HTMLInsertionModeInitial:(HTMLToken *)token