diff --git a/src/Objects/DesktopFile.vala b/src/Objects/DesktopFile.vala index 2cb3bfe..6f87a0e 100644 --- a/src/Objects/DesktopFile.vala +++ b/src/Objects/DesktopFile.vala @@ -52,7 +52,7 @@ namespace Webpin { public DesktopFile (string name, string url, string icon) { this.name = name; - this.url = url; + this.url = url.replace ("%", "%%"); this.icon = icon; file = new GLib.KeyFile(); @@ -153,7 +153,7 @@ namespace Webpin { var desktop_app = new GLib.DesktopAppInfo(app.get_id ()); - var exec = desktop_app.get_string ("Exec"); + var exec = desktop_app.get_string ("Exec").replace ("%%", "%"); if (exec != null && exec.contains (url)) { return desktop_app; diff --git a/src/Widgets/ApplicationsView.vala b/src/Widgets/ApplicationsView.vala index 4ccb680..45d1639 100644 --- a/src/Widgets/ApplicationsView.vala +++ b/src/Widgets/ApplicationsView.vala @@ -56,7 +56,7 @@ namespace Webpin { if ((child as Gtk.FlowBoxChild).get_child () is ApplicationIcon) { var app_icon = (child as Gtk.FlowBoxChild).get_child () as ApplicationIcon; try { - Process.spawn_command_line_async ("com.github.artemanufrij.webpin " + app_icon.desktop_file.url); + Process.spawn_command_line_async ("com.github.artemanufrij.webpin " + app_icon.desktop_file.url.replace("%%", "%")); } catch (SpawnError e) { debug ("Error: %s\n", e.message); } diff --git a/src/Widgets/Assistant.vala b/src/Widgets/Assistant.vala index 4b2c488..507a524 100644 --- a/src/Widgets/Assistant.vala +++ b/src/Widgets/Assistant.vala @@ -298,7 +298,7 @@ namespace Webpin { string icon = icon_name_entry.get_text (); string name = app_name_entry.get_text (); - string url = app_url_entry.get_text (); + string url = app_url_entry.get_text ().replace ("%", "%%"); if (icon == "") icon = default_app_icon; @@ -320,7 +320,7 @@ namespace Webpin { mode = assistant_mode.edit_app; app_name_entry.text = desktop_file.name; app_name_entry.set_sensitive (false); - app_url_entry.text = desktop_file.url; + app_url_entry.text = desktop_file.url.replace ("%%", "%"); icon_name_entry.text = desktop_file.icon; update_app_icon (); }