Skip to content

Commit

Permalink
Escape message passed to gtk_label_set_markup()
Browse files Browse the repository at this point in the history
Fixes #5
  • Loading branch information
atj committed Dec 20, 2022
1 parent 8cae98c commit ea5de27
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ssh-askpass-fullscreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ passphrase_dialog(char *message)
GdkPixmap *pixmap;
GdkRectangle rect;
GdkColor color;
gchar *str;
gchar *escaped_message, *str;
GdkGrabStatus status;
int grab_tries = 0;
const char *failed;
Expand Down Expand Up @@ -367,8 +367,10 @@ passphrase_dialog(char *message)

gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 12);

escaped_message = g_markup_escape_text(message, strlen(message));
str = g_strdup_printf("<span foreground=\"white\" size=\"xx-large\"><b>%s</b></span>",
message);
escaped_message);
g_free(escaped_message);
gtk_label_set_markup(GTK_LABEL(label), str);
g_free(str);

Expand Down

0 comments on commit ea5de27

Please sign in to comment.