diff -ur lynx-2.8.6/WWW/Library/Implementation/SGML.c mine/lynx-2.8.6/WWW/Library/Implementation/SGML.c --- lynx-2.8.6/WWW/Library/Implementation/SGML.c 2006-01-22 20:16:14.000000000 -0500 +++ mine/lynx-2.8.6/WWW/Library/Implementation/SGML.c 2007-04-15 17:03:31.000000000 -0400 @@ -200,6 +200,7 @@ BOOL first_bracket; BOOL second_bracket; BOOL isHex; + BOOL end_slash; HTParentAnchor *node_anchor; LYUCcharset *inUCI; /* pointer to anchor UCInfo */ @@ -3472,12 +3473,28 @@ case S_tag_gap: /* Expecting attribute or '>' */ if (WHITE(c)) break; /* Gap between attributes */ + if (c == '/') { + context->end_slash = TRUE; + break; + } if (c == '>') { /* End of tag */ #ifdef USE_PRETTYSRC if (!psrc_view) #endif - if (context->current_tag->name) + if (context->current_tag->name) { start_element(context); + if (context->end_slash) { + if (context->recover == NULL) { + StrAllocCopy(context->recover, "recover_index = 0; + } else { + StrAllocCat(context->recover, "recover, context->current_tag->name); + StrAllocCat(context->recover, ">"); + context->end_slash = FALSE; + } + } #ifdef USE_PRETTYSRC if (psrc_view) { PSRCSTART(abracket); @@ -3485,9 +3502,11 @@ PSRCSTOP(abracket); } #endif + context->end_slash = FALSE; context->state = S_text; break; } + context->end_slash = FALSE; HTChunkPutc(string, c); context->state = S_attr; /* Get attribute */ break;