summaryrefslogtreecommitdiff
path: root/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'common.c')
-rw-r--r--common.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/common.c b/common.c
index 7b845d8..951055c 100644
--- a/common.c
+++ b/common.c
@@ -924,7 +924,7 @@ ctcp_parse (const char *message)
if (my_is_ctcp)
ctcp_parse_tagged (m.str + my_start, i - my_start, chunk);
else
- ctcp_intra_decode (m.str + my_start, i - my_start, &chunk->text);
+ str_append_data (&chunk->text, m.str + my_start, i - my_start);
LIST_APPEND_WITH_TAIL (result, result_tail, chunk);
}
@@ -933,7 +933,10 @@ ctcp_parse (const char *message)
if (!in_ctcp && start != m.len)
{
struct ctcp_chunk *chunk = ctcp_chunk_new ();
- ctcp_intra_decode (m.str + start, m.len - start, &chunk->text);
+ // According to the original CTCP specification we should use
+ // ctcp_intra_decode() but no one seems to use that and it breaks
+ // normal text with backslashes
+ str_append_data (&chunk->text, m.str + start, m.len - start);
LIST_APPEND_WITH_TAIL (result, result_tail, chunk);
}