mothra: work arround mismatched quotes in html attributes
This commit is contained in:
parent
4f57de2ab8
commit
3707561e04
1 changed files with 5 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue