From 5471b1eacad50a313133c93f68b3495948479bb3 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Sat, 5 Nov 2016 15:27:37 +0100 Subject: [PATCH] htmlparser: support parsing of class=foobar without quotes --- lib/pure/parsexml.nim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/pure/parsexml.nim b/lib/pure/parsexml.nim index aa4a13ecf5..978c9c5161 100644 --- a/lib/pure/parsexml.nim +++ b/lib/pure/parsexml.nim @@ -572,6 +572,10 @@ proc parseAttribute(my: var XmlParser) = inc(pos) else: markError(my, errQuoteExpected) + # error corrections: guess what was meant + while buf[pos] != '>' and buf[pos] > ' ': + add(my.b, buf[pos]) + inc pos my.bufpos = pos parseWhitespace(my, skip=true)