diff options
author | bptato <nincsnevem662@gmail.com> | 2022-07-17 23:26:18 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-07-17 23:26:18 +0200 |
commit | 19989f9f0a2845bd6a8fe21db3689f1cd91a8a5a (patch) | |
tree | d90f6b6886b11094dce21dc2ade81e5aaf60ac69 /src/html | |
parent | 9cf21945449596aa7632a583bc9b2fd211d4cf5e (diff) | |
download | chawan-19989f9f0a2845bd6a8fe21db3689f1cd91a8a5a.tar.gz |
Fix another parser bug
Diffstat (limited to 'src/html')
-rw-r--r-- | src/html/htmlparser.nim | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/html/htmlparser.nim b/src/html/htmlparser.nim index b46a3dfa..92e264ff 100644 --- a/src/html/htmlparser.nim +++ b/src/html/htmlparser.nim @@ -202,9 +202,10 @@ func createElement(parser: HTML5Parser, token: Token, namespace: Namespace, inte not parser.openElements.hasElement(TAG_TEMPLATE) and (element.tagType notin ListedElements or not element.attrb("form")) and intendedParent.inSameTree(parser.form): - let element = FormAssociatedElement(element) - element.setForm(parser.form) - element.parserInserted = true + if element.tagType in {TAG_SELECT, TAG_INPUT}: #TODO implement the other ones too + let element = FormAssociatedElement(element) + element.setForm(parser.form) + element.parserInserted = true return element proc insert(location: AdjustedInsertionLocation, node: Node) = |