ref: 3cf0874edc44f067210741b1785f912de8235873
parent: 62e3c5158da3a49d23cff8f01338269452f1aa8a
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Fri Jul 20 04:56:29 EDT 2012
mothra: work arround mismatched quotes in html attributes
--- a/sys/src/cmd/mothra/rdhtml.c
+++ b/sys/src/cmd/mothra/rdhtml.c
@@ -482,12 +482,14 @@
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);
--
⑨