diff --git a/netmapr.c b/netmapr.c index b549b20..5f8b04e 100644 --- a/netmapr.c +++ b/netmapr.c @@ -4964,13 +4964,31 @@ char *fixforhtml(char *oldtext, char *newtext) { char *p, *p2; p2 = newtext; for (p = oldtext ; *p ; p++) { - if (*p == '&') { - *p2 = '\0'; - strcat(p2, "&"); - p2 += strlen("&"); - } else { - *p2 = *p; - p2++; + switch (*p) { + case '&': + *p2 = '\0'; + strcat(p2, "&"); + p2 += strlen("&"); + break; + case '"': + *p2 = '\0'; + strcat(p2, """); + p2 += strlen("""); + break; + case '<': + *p2 = '\0'; + strcat(p2, "<"); + p2 += strlen("<"); + break; + case '>': + *p2 = '\0'; + strcat(p2, ">"); + p2 += strlen(">"); + break; + default: + *p2 = *p; + p2++; + break; } } @@ -9116,8 +9134,6 @@ int updatetextcursor(void) { tempbuf[1] = '\0'; TTF_SizeText(font[updateheight], tempbuf, &cwid, &dummy); } - - // oooooooooooooooooooooo /* draw cursor (a solid block) */ for (y = starty ; y < (starty + sh); y++ ) { @@ -9132,7 +9148,7 @@ int updatetextcursor(void) { // update screen SDL_UpdateRect(screen, startx - screenx, starty - screeny, - startx - screenx + tw + cwid + 3 , th); + tw + cwid + 3 , th); //SDL_Flip(screen);