diff options
Diffstat (limited to 'otr.c')
-rw-r--r-- | otr.c | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -750,14 +750,9 @@ void op_create_instag(void *opdata, const char *account, const char *protocol) } } -static char *otr_filter_colors(char *msg) { - int i; - for (i = 0; msg[i]; i++) { - if (msg[i] == '\x02' || msg[i] == '\x03') { - msg[i] = '?'; - } - } - return msg; +static char *otr_filter_colors(char *msg) +{ + return str_reject_chars(msg, "\x02\x03", '?'); } /* returns newly allocated string */ |