diff options
author | Alexandre De Dommelin <adedommelin@tuxz.net> | 2017-03-12 15:49:46 -0700 |
---|---|---|
committer | Lukas Schwaighofer <lukas@schwaighofer.name> | 2017-03-12 15:49:46 -0700 |
commit | 3243678674023aa87a8722afb9898cce148f2129 (patch) | |
tree | 693615726fb0ddb4d2818c7c079fc30562afb7dd | |
parent | 4500b7dce281e06f0fd9cefa753bfd4f0fce7d9d (diff) |
escaping
# Description: Correct escaping of characters
# Author: Luca Bedogni <me@lucabedogni.it>
Gbp-Pq: Name 10-escaping.patch
-rw-r--r-- | src/gtkcompletionline.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gtkcompletionline.cc b/src/gtkcompletionline.cc index 374deee..7aba856 100644 --- a/src/gtkcompletionline.cc +++ b/src/gtkcompletionline.cc @@ -226,12 +226,9 @@ string quote_string(const string& str) const char* i = str.c_str(); while (*i) { char c = *i++; - switch (c) { - case ' ': - res += '\\'; - default: - res += c; - } + if (c == ' ' || c == '(' || c == ')' || c =='\'') + res += '\\'; + res += c; } return res; } |