GNOME Bugzilla – Bug 676277
Document that g_app_info_create_from_commandline() does unquoting according to fd.o
Last modified: 2012-05-26 15:07:02 UTC
g_app_info_create_from_commandline()'s commandline argument is effectively processed like a .desktop Exec key field. It took me a while to figure out why '%' characters got stripped from my commandline argument, so I propose this documentation enhancement.
Created attachment 214279 [details] [review] Document that g_app_info_create_from_commandline() does unquoting according to fd.o
Review of attachment 214279 [details] [review]: Sure, looks good. What would make this even better is an example of what this means in practice.
Pushed an ammended version of the patch that mentions percent-encoded URIs as an example of a potential pitfall. Thanks for the quick response! Attachment 214279 [details] pushed as 0e6d9df - Document that g_app_info_create_from_commandline() does unquoting according to fd.o
Thinking about it, I wonder if it'd be worth having a convenience function that does Exec key quoting in glib (analogous to e.g. g_shell_quote()), because any application that uses g_app_info_create_from_commandline() seems likely to need it anyways. I could provide a patch if that API was wanted.