diff options
| author | Milan Crha <mcrha@redhat.com> | 2020-09-14 18:59:13 +0200 |
|---|---|---|
| committer | Milan Crha <mcrha@redhat.com> | 2020-09-14 18:59:13 +0200 |
| commit | f50eb67d8ab4413f5df45718f904b247a126e920 (patch) | |
| tree | c5f80bc317446db2dfa7b6f3e75aa7735d3405b6 /src/libedataserverui | |
| parent | 70784e21824991ebd9e8b3b202b49bdfa833e1b8 (diff) | |
| download | evolution-data-server-f50eb67d8ab4413f5df45718f904b247a126e920.tar.gz | |
evo-I#1095 - Password Credentials Prompt: Escape text for use in markup
Related to https://gitlab.gnome.org/GNOME/evolution/-/issues/1095
Diffstat (limited to 'src/libedataserverui')
| -rw-r--r-- | src/libedataserverui/e-credentials-prompter-impl-password.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libedataserverui/e-credentials-prompter-impl-password.c b/src/libedataserverui/e-credentials-prompter-impl-password.c index 3706cd25e..0376f3c12 100644 --- a/src/libedataserverui/e-credentials-prompter-impl-password.c +++ b/src/libedataserverui/e-credentials-prompter-impl-password.c @@ -59,7 +59,7 @@ credentials_prompter_impl_password_get_prompt_strings (ESourceRegistry *registry GString *description; const gchar *message; gchar *display_name; - gchar *host_name = NULL; + gchar *host_name = NULL, *tmp; /* Known types */ enum { @@ -147,8 +147,6 @@ credentials_prompter_impl_password_get_prompt_strings (ESourceRegistry *registry description = g_string_sized_new (256); - g_string_append_printf (description, "<big><b>%s</b></big>\n\n", message); - switch (type) { case TYPE_ADDRESS_BOOK: g_string_append_printf (description, @@ -184,6 +182,12 @@ credentials_prompter_impl_password_get_prompt_strings (ESourceRegistry *registry g_string_append_printf ( description, "\n(host: %s)", host_name); + tmp = g_markup_escape_text (description->str, -1); + + g_string_assign (description, ""); + g_string_append_printf (description, "<big><b>%s</b></big>\n\n%s", message, tmp); + g_free (tmp); + *prompt_title = g_strdup (message); *prompt_description = description; |
