summaryrefslogtreecommitdiff
path: root/src/fe-common
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2017-02-21 15:54:31 +0100
committerLemonBoy <thatlemon@gmail.com>2017-02-22 11:49:09 +0100
commit027acffb4208d7e6ba8e229cbf6c3dae6f5dabaf (patch)
treedbd545231f3d041717bf978ea54b5b48f9caebb8 /src/fe-common
parentdb85ab7c90f23e00cd444728f6a5b3d1f63254df (diff)
downloadirssi-027acffb4208d7e6ba8e229cbf6c3dae6f5dabaf.zip
Handle file names with quotes.
Let's repurpose escape_string and make it more flexible by letting us choose the characters to escape.
Diffstat (limited to 'src/fe-common')
-rw-r--r--src/fe-common/core/chat-completion.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fe-common/core/chat-completion.c b/src/fe-common/core/chat-completion.c
index 1f00feaf..4fe9509a 100644
--- a/src/fe-common/core/chat-completion.c
+++ b/src/fe-common/core/chat-completion.c
@@ -1113,7 +1113,7 @@ static void event_text(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
/* the nick is quoted in case it contains '-' character. also
spaces should work too now :) The nick is also escaped in case
it contains '\' characters */
- target = escape_string(window_item_get_target(item));
+ target = escape_string(window_item_get_target(item), "\"'\\");
str = g_strdup_printf(IS_CHANNEL(item) ? "-channel \"%s\" %s" :
IS_QUERY(item) ? "-nick \"%s\" %s" : "%s %s",
target, line);