diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-07-20 08:56:29 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-07-20 08:56:29 +0200 |
commit | 3707561e047f8e7c9993e0ba5a3a3fb5b5f6a6fd (patch) | |
tree | ba72ea7770dbee4475d063ebb972cd697bf698ce /sys | |
parent | 4f57de2ab8a163d8e888bec2e5179cb173a7e525 (diff) |
mothra: work arround mismatched quotes in html attributes
Diffstat (limited to 'sys')
-rw-r--r-- | sys/src/cmd/mothra/rdhtml.c | 8 |
1 files 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); |