shortcuts window: Fix handling of significant xml chars

We are using markup in the labels, so we need to escape things
like < and >.

https://bugzilla.gnome.org/show_bug.cgi?id=767795
This commit is contained in:
Matthias Clasen 2016-06-19 17:49:03 -04:00
parent ed2bb7e012
commit 1c6b878e09

View File

@ -150,6 +150,21 @@ get_labels (guint key, GdkModifierType modifier, guint *n_mods)
{
switch (ch)
{
case '<':
labels[i++] = "&lt;";
break;
case '>':
labels[i++] = "&gt;";
break;
case '&':
labels[i++] = "&amp;";
break;
case '"':
labels[i++] = "&quot;";
break;
case '\'':
labels[i++] = "&apos;";
break;
case '\\':
labels[i++] = C_("keyboard label", "Backslash");
break;