Guake/guake — pull request #339 by jadrian (2014-06-26 23:41:26+00:00)
Title: Added XML escaping for key combinations shown in GTK dialogs.

Hi devs-

I ran into this bug --- https://bugs.launchpad.net/ubuntu/+source/guake/+bug/1018643 --- and spent a little while investigating it. Essentially, some users (including me) are having global-keyboard-shortcut conflicts when they try to customize the show/hide shortcut in Guake. That's not Guake's problem (though it'd be great, as a future feature request, to provide the user with some feedback about what other shortcut, set elsewhere, is causing the problem). However, in the dialog box that Guake attempts to create, if the shortcut uses the key, GTK throws a fit and the dialog box comes out mangled.

The issue is that GTK uses HTML syntax to format body text in dialog boxes, and the string "" breaks its HTML parser. The solution is to XML-escape the name of the keyboard combination, which is what I've done in this pull request. I tried to make my changes very narrow, so I hope this would be an easy merge.

Thanks for working on such a useful tool!

-Jadrian