diff options
author | Havoc Pennington <hp@pobox.com> | 2002-09-15 16:39:28 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2002-09-15 16:39:28 +0000 |
commit | 8232b8ba6d992ad96f5e7fcda662819818c527e4 (patch) | |
tree | 6de6cd376e272dfd806d874932bf1b0e9d868f02 /src/session.c | |
parent | cfa98e02fcaae0ce49fc94fcbc0bc947ea2ea730 (diff) | |
download | metacity-8232b8ba6d992ad96f5e7fcda662819818c527e4.tar.gz |
escape the window title before saving in the session file, reported by Jos
2002-09-15 Havoc Pennington <hp@pobox.com>
* src/session.c (save_state): escape the window title before
saving in the session file, reported by Jos Vos
Diffstat (limited to 'src/session.c')
-rw-r--r-- | src/session.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/session.c b/src/session.c index 0637a9e4..44f12359 100644 --- a/src/session.c +++ b/src/session.c @@ -944,6 +944,7 @@ save_state (void) char *res_class; char *res_name; char *role; + char *title; /* client id, class, name, role are not expected to be * in UTF-8 (I think they are in XPCS which is Latin-1? @@ -957,6 +958,10 @@ save_state (void) encode_text_as_utf8_markup (window->res_name) : NULL; role = window->role ? encode_text_as_utf8_markup (window->role) : NULL; + if (window->title) + title = g_markup_escape_text (window->title, -1); + else + title = NULL; meta_topic (META_DEBUG_SM, "Saving session managed window %s, client ID '%s'\n", window->desc, window->sm_client_id); @@ -966,7 +971,7 @@ save_state (void) sm_client_id, res_class ? res_class : "", res_name ? res_name : "", - window->title ? window->title : "", + title ? title : "", role ? role : "", window_type_to_string (window->type), stack_position); @@ -975,6 +980,7 @@ save_state (void) g_free (res_class); g_free (res_name); g_free (role); + g_free (title); /* Sticky */ if (window->on_all_workspaces) |