diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-02-11 23:57:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-02-11 23:57:17 +0300 |
commit | 165556c8ddf4d3a036d6d89e680e208d2b435866 (patch) | |
tree | 719d66843668bfb37cae499581960d2942c5b3fd /src/utils/stringutils.cpp | |
parent | af8863d722f06153877d289b939b5ba84713621d (diff) | |
download | plus-165556c8ddf4d3a036d6d89e680e208d2b435866.tar.gz plus-165556c8ddf4d3a036d6d89e680e208d2b435866.tar.bz2 plus-165556c8ddf4d3a036d6d89e680e208d2b435866.tar.xz plus-165556c8ddf4d3a036d6d89e680e208d2b435866.zip |
improve autocomplete sanitization.
Diffstat (limited to 'src/utils/stringutils.cpp')
-rw-r--r-- | src/utils/stringutils.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp index 8e657bb93..224c2a8e8 100644 --- a/src/utils/stringutils.cpp +++ b/src/utils/stringutils.cpp @@ -721,3 +721,9 @@ bool isDigit(const std::string &str) } return true; } + +void secureChatCommand(std::string &str) +{ + if (str[0] == '/' || str[0] == '@' || str[0] == '#') + str = "_" + str; +} |