Linux: Fix recent entries with quote in filename
According to RFC 2396, the single quote character (') is allowed in uri strings and is not escaped by gtk, so the action string constructed for the recent files menu must be quoted with " instead of '. This fixes issue #437
This commit is contained in:
parent
629724d865
commit
327dcd3d7b
|
@ -3383,7 +3383,7 @@ common_gtk_main(GApplication *app, gpointer user_data)
|
|||
const char *name = gtk_recent_info_get_display_name(info);
|
||||
// TODO: Is that enough? Maybe allocate instead?
|
||||
char action[1024];
|
||||
sprintf(action, "app.recent('%s')", uri);
|
||||
sprintf(action, "app.recent(\"%s\")", uri);
|
||||
g_menu_append(G_MENU(user_data), name, action);
|
||||
|
||||
gtk_recent_info_unref(info);
|
||||
|
|
Loading…
Reference in New Issue