summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2004-09-15 19:25:37 +0000
committerTor Lillqvist <tml@src.gnome.org>2004-09-15 19:25:37 +0000
commit395402a366778cff95d51809859751f8a995ebff (patch)
tree5ba7a9fb3352fb42c098ce92f781a9c108b76a63 /pango
parent6479229c21d4824ca6e2a3de783248a2ea3a3938 (diff)
downloadpango-395402a366778cff95d51809859751f8a995ebff.tar.gz
Escape also backslashes. (#152607, Kazuki Iwamoto)
2004-09-15 Tor Lillqvist <tml@iki.fi> * pango/querymodules.c (string_needs_escape, escape_string): Escape also backslashes. (#152607, Kazuki Iwamoto)
Diffstat (limited to 'pango')
-rw-r--r--pango/querymodules.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pango/querymodules.c b/pango/querymodules.c
index 8ea48b7a..557ae7ac 100644
--- a/pango/querymodules.c
+++ b/pango/querymodules.c
@@ -52,7 +52,7 @@ string_needs_escape (const char *str)
if (!c)
return FALSE;
- else if (c == '\"' || g_ascii_isspace (c))
+ else if (c == '\"' || c == '\\' || g_ascii_isspace (c))
return TRUE;
}
}
@@ -76,6 +76,9 @@ escape_string (const char *str)
case '\"':
g_string_append (result, "\\\"");
break;
+ case '\\':
+ g_string_append (result, "\\\\");
+ break;
default:
g_string_append_c (result, c);
}