Commit cab1d799 authored by Andrea Schaefer's avatar Andrea Schaefer

Add /r to strsplit delimiters

parent 16980184
......@@ -1490,7 +1490,7 @@ chatty_blist_chats_update_node (PurpleBuddy *buddy,
tag,
last_message_striped);
last_msg = chatty_utils_strip_newlines (last_msg_text);
last_msg = chatty_utils_strip_cr_lf (last_msg_text);
last_msg_ts = chatty_utils_time_ago_in_words (chatty_node->conv.last_msg_ts_raw,
CHATTY_UTILS_TIME_AGO_SHOW_DATE);
......
......@@ -206,12 +206,12 @@ chatty_utils_strip_blanks (const char *string)
char *
chatty_utils_strip_newlines (const char *string)
chatty_utils_strip_cr_lf (const char *string)
{
char *result;
char **chunks;
chunks = g_strsplit (string, "\n", 0);
chunks = g_strsplit_set (string, "\r\n", 0);
result = g_strjoinv(" ", chunks);
......
......@@ -20,7 +20,7 @@ typedef enum {
char *chatty_utils_jabber_id_strip (const char *name);
char *chatty_utils_strip_blanks (const char *string);
char *chatty_utils_strip_newlines (const char *string);
char *chatty_utils_strip_cr_lf (const char *string);
char *chatty_utils_format_phonenumber (const char *phone_number);
void chatty_utils_generate_uuid (char **uuid);
char *chatty_utils_time_ago_in_words (time_t time_stamp, ChattyTimeAgoFlags flags);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment