Hi, below is a small optinization to Html_parse_entities (). Cheers, Johannes diff -r bd486ec2a522 src/html.cc --- a/src/html.cc Sat Mar 15 19:41:01 2008 +0100 +++ b/src/html.cc Sat Mar 15 20:23:03 2008 +0100 @@ -1397,13 +1397,14 @@ static char * { const char *esc_set = "&\xE2\xC2"; char *new_str, buf[4]; - int i, j, k, n, isocode, entsize; + int i, j, k, n, s, isocode, entsize; new_str = dStrndup(token, toksize); - if (new_str[strcspn(new_str, esc_set)] == 0) + s = strcspn(new_str, esc_set); + if (new_str[s] == 0) return new_str; - for (i = j = 0; i < toksize; i++) { + for (i = j = s; i < toksize; i++) { if (token[i] == '&' && (isocode = Html_parse_entity(html, token+i, toksize-i, &entsize)) >= 0) {