abaco: allow single quotes for ctype attribute (thanks plhk)
plhk9 → abaco: charset 'utf-8'> not supported plhk9 → http://plhk.ru/trash/abaco-singlequote.diff makes it go away
This commit is contained in:
parent
3d581e8b72
commit
4cbfe26da4
1 changed files with 8 additions and 4 deletions
|
@ -866,7 +866,7 @@ static
|
|||
int
|
||||
findctype(char *b, int l, char *keyword, char *s)
|
||||
{
|
||||
char *p, *e;
|
||||
char *p, *e, c;
|
||||
int i;
|
||||
|
||||
p = cistrstr(s, keyword);
|
||||
|
@ -882,14 +882,18 @@ findctype(char *b, int l, char *keyword, char *s)
|
|||
p++;
|
||||
if(!*p)
|
||||
return -1;
|
||||
if(*p == '"'){
|
||||
switch (c = *p){
|
||||
case '"':
|
||||
case '\'':
|
||||
p++;
|
||||
e = strchr(p, '"');
|
||||
e = strchr(p, c);
|
||||
if(!e)
|
||||
return -1;
|
||||
}else
|
||||
break;
|
||||
default:
|
||||
for(e = p; *e < 127 && *e > ' ' ; e++)
|
||||
;
|
||||
}
|
||||
i = e-p;
|
||||
if(i < 1)
|
||||
return -1;
|
||||
|
|
Loading…
Reference in a new issue