Hi developers there, I found (hope so) a bug in parsing HTML comments. Acording to HTML 4.01 spec it is possible to make such a comment: <!-- This is OK commment -- > Please show me... Point your browsers here: http://eva.fit.vutbr.cz/~xnowak01/comment2.html I talk about the (white)space after two dashes. I CVS version the "Please show me..." sentence is not shown. After this "patch" is: --- html.c 2006-01-04 22:45:34.000000000 +0100 +++ html.c 2006-01-05 01:49:17.000000000 +0100 @@ -4936,7 +4936,10 @@ * everything except a matching "-->" tag. */ while ( (p = memchr(buf + buf_index, '>', bufsize - buf_index)) ){ buf_index = p - buf + 1; - if ( p[-1] == '-' && p[-2] == '-' ) break; + gint counter = -1; + while (isspace(p[counter])) + counter--; + if ( p[counter] == '-' && p[counter-1] == '-' ) break; } if ( p ) { /* Got the whole comment. Let's throw it away! :) */ It's hackish and ugly. I know. From: http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.4 "White space is not permitted between the markup declaration open delimiter("<!") and the comment open delimiter ("--"), but is permitted between the comment close delimiter ("--") and the markup declaration close delimiter (">"). A common error is to include a string of hyphens ("---") within a comment. Authors should avoid putting two or more adjacent hyphens inside comments." Michal Nowak