From 3707561e047f8e7c9993e0ba5a3a3fb5b5f6a6fd Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Fri, 20 Jul 2012 08:56:29 +0200 Subject: mothra: work arround mismatched quotes in html attributes --- sys/src/cmd/mothra/rdhtml.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/src/cmd/mothra/rdhtml.c b/sys/src/cmd/mothra/rdhtml.c index 0fb528a7f..7e663563b 100644 --- a/sys/src/cmd/mothra/rdhtml.c +++ b/sys/src/cmd/mothra/rdhtml.c @@ -482,12 +482,14 @@ int pl_gettag(Hglob *g){ pl_putback(g, c); q = 0; while((c=pl_nextc(g))!=EOF){ - if(c == '\'' || c == '"'){ - if(q == 0) + if(c == '=' && q == 0) + q = '='; + else if(c == '\'' || c == '"'){ + if(q == '=') q = c; else if(q == c) q = 0; - } else if(c == ETAG && q == 0) + } else if(c == ETAG && q != '\'' && q != '"') break; if(tokp < &g->token[NTOKEN-UTFmax-1]) tokp += lrunetochar(tokp, c); -- cgit v1.2.3