Strip ansi from quotes
This commit is contained in:
parent
40251fd7e9
commit
6b0aa28f2d
@ -288,6 +288,9 @@ char *external_editor(int socket, struct user_record *user, char *to, char *from
|
|||||||
fprintf(fptr, "\r\n");
|
fprintf(fptr, "\r\n");
|
||||||
} else if (quote[i] == 0x1) {
|
} else if (quote[i] == 0x1) {
|
||||||
continue;
|
continue;
|
||||||
|
} else if (quote[i] == '\e' && quote[i + 1] == '[') {
|
||||||
|
while (strchr("ABCDEFGHIGJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", quote[i]) == NULL)
|
||||||
|
i++;
|
||||||
} else {
|
} else {
|
||||||
fprintf(fptr, "%c", quote[i]);
|
fprintf(fptr, "%c", quote[i]);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user