diff options
author | Benoit Foucher <benoit@zeroc.com> | 2008-11-12 11:22:37 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2008-11-12 11:22:37 +0100 |
commit | a000857ff6a9ad91cc1931ce367520f66b9f5a80 (patch) | |
tree | 877505ed78f842594814b6b627323a589ac2675b /cpp/src/IceGrid/Util.cpp | |
parent | Fixed bug 3537 - Assertion when Ice.ThreadPool.Client thread creation fails (diff) | |
parent | Fixed bug 3539 - SEGFAULT if thread start() fails in constructor (diff) | |
download | ice-a000857ff6a9ad91cc1931ce367520f66b9f5a80.tar.bz2 ice-a000857ff6a9ad91cc1931ce367520f66b9f5a80.tar.xz ice-a000857ff6a9ad91cc1931ce367520f66b9f5a80.zip |
Merge commit 'origin/R3_3_branch'
Diffstat (limited to 'cpp/src/IceGrid/Util.cpp')
-rw-r--r-- | cpp/src/IceGrid/Util.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cpp/src/IceGrid/Util.cpp b/cpp/src/IceGrid/Util.cpp index d3b6b998738..704f093f24a 100644 --- a/cpp/src/IceGrid/Util.cpp +++ b/cpp/src/IceGrid/Util.cpp @@ -100,14 +100,23 @@ IceGrid::createProperty(const string& name, const string& value) string IceGrid::escapeProperty(const string& s) { + size_t firstChar = s.find_first_not_of(' '); + size_t lastChar = s.find_last_not_of(' '); string result; for(unsigned int i = 0; i < s.size(); ++i) { char c = s[i]; switch(c) { - case '\\': case ' ': + if(i < firstChar || i > lastChar) + { + result.push_back('\\'); + } + result.push_back(c); + break; + + case '\\': case '#': case '=': result.push_back('\\'); |