Issue #65, fix for ignoring cdata.
This commit is contained in:
parent
04ca419080
commit
94b0647c08
15
src/lexer.c
15
src/lexer.c
|
@ -1990,22 +1990,13 @@ static Bool IsInQuotesorComment( Lexer * lexer )
|
||||||
/* Ignore **EVERYTHING** until "]]>" */
|
/* Ignore **EVERYTHING** until "]]>" */
|
||||||
i++;
|
i++;
|
||||||
off = 0;
|
off = 0;
|
||||||
for ( ; i < lexer->lexsize; i++ )
|
for ( ; i <= lexer->lexsize - 3; i++ )
|
||||||
{
|
{
|
||||||
pnc = &lexer->lexbuf[i];
|
pnc = &lexer->lexbuf[i];
|
||||||
c = *pnc;
|
if (*pnc == ']' && *(pnc + 1) == ']' && *(pnc + 2) == '>')
|
||||||
if ( c == ']' ) {
|
{
|
||||||
buff[off++] = c;
|
|
||||||
} else if (off && ((off + 1) < MX_TAG_BUFF)) {
|
|
||||||
buff[off++] = c;
|
|
||||||
if ( c == '>' ) {
|
|
||||||
buff[off] = 0;
|
|
||||||
if (TY_(tmbstrcmp)(buff,"]]>") == 0) {
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
off = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue