[evolution-data-server] evo-I#1095 - Password Credentials Prompt: Escape text for use in markup



commit f50eb67d8ab4413f5df45718f904b247a126e920
Author: Milan Crha <mcrha redhat com>
Date:   Mon Sep 14 18:59:13 2020 +0200

    evo-I#1095 - Password Credentials Prompt: Escape text for use in markup
    
    Related to https://gitlab.gnome.org/GNOME/evolution/-/issues/1095

 src/libedataserverui/e-credentials-prompter-impl-password.c | 10 +++++++---
 1 file 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;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]