Issue #65, fix for ignoring cdata.

This commit is contained in:
Christopher Brannon 2015-09-24 18:12:28 -07:00
parent 04ca419080
commit 94b0647c08

View file

@ -1990,21 +1990,12 @@ 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; break;
} else if (off && ((off + 1) < MX_TAG_BUFF)) {
buff[off++] = c;
if ( c == '>' ) {
buff[off] = 0;
if (TY_(tmbstrcmp)(buff,"]]>") == 0) {
break;
}
off = 0;
}
} }
} }
} }