aboutsummaryrefslogtreecommitdiff
path: root/src/ClientPattern.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/ClientPattern.cc')
-rw-r--r--src/ClientPattern.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ClientPattern.cc b/src/ClientPattern.cc
index c93708a..7cd4ce1 100644
--- a/src/ClientPattern.cc
+++ b/src/ClientPattern.cc
@@ -169,7 +169,13 @@ std::string ClientPattern::toString() const {
169 Terms::const_iterator it = m_terms.begin(); 169 Terms::const_iterator it = m_terms.begin();
170 Terms::const_iterator it_end = m_terms.end(); 170 Terms::const_iterator it_end = m_terms.end();
171 for (; it != it_end; ++it) { 171 for (; it != it_end; ++it) {
172
172 pat.append(" ("); 173 pat.append(" (");
174 // replace special chars like ( ) and [ ] with \( \) and \[ \]
175 string orig = FbTk::StringUtil::replaceString((*it)->orig, "(", "\\(");
176 orig = FbTk::StringUtil::replaceString(orig, ")", "\\)");
177 orig = FbTk::StringUtil::replaceString(orig, "[", "\\[");
178 orig = FbTk::StringUtil::replaceString(orig, "]", "\\]");
173 179
174 switch ((*it)->prop) { 180 switch ((*it)->prop) {
175 case NAME: 181 case NAME:
@@ -185,7 +191,7 @@ std::string ClientPattern::toString() const {
185 pat.append("role="); 191 pat.append("role=");
186 } 192 }
187 193
188 pat.append((*it)->orig); 194 pat.append(orig);
189 pat.append(")"); 195 pat.append(")");
190 } 196 }
191 197