{
int i;
tagText(event, text_start, cp - 1);
- for (i = 1; cp[i] && cp[i] != '>'; i++)
- ;
- event.openTagStart(cp, i);
+ if (cp[1] == '-' && cp[2] == '-')
+ {
+ for (i = 3; cp[i]; i++)
+ if (cp[i] == '-' && cp[i+1] == '-' && cp[i+2] == '>')
+ {
+ i+= 2;
+ event.openTagStart(cp, i);
+ break;
+ }
+ }
+ else
+ {
+ for (i = 1; cp[i] && cp[i] != '>'; i++)
+ ;
+ event.openTagStart(cp, i);
+ }
if (m_verbose)
printf("------ dtd %.*s\n", i, cp);
i += tagEnd(event, cp, i, cp + i);
mp::HTMLParser hp;
const char* html =
"<?xml version=\"1.0\" strandalone=\"no\"? ax>\n"
- "<book><x ? href/></book>";
+ "<book><x ? href/><!-- hello > --></book>";
const char* expected = html;
MyEvent e;