[gtk+/gtk-3-20] shortcuts window: Fix handling of significant xml chars
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-20] shortcuts window: Fix handling of significant xml chars
- Date: Thu, 4 Aug 2016 15:39:23 +0000 (UTC)
commit 8fd61c4f5a97da774e938141acbe0fa7f66efb88
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Jun 19 17:49:03 2016 -0400
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
gtk/gtkshortcutlabel.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkshortcutlabel.c b/gtk/gtkshortcutlabel.c
index a62641a..06b1736 100644
--- a/gtk/gtkshortcutlabel.c
+++ b/gtk/gtkshortcutlabel.c
@@ -150,6 +150,21 @@ get_labels (guint key, GdkModifierType modifier, guint *n_mods)
{
switch (ch)
{
+ case '<':
+ labels[i++] = "<";
+ break;
+ case '>':
+ labels[i++] = ">";
+ break;
+ case '&':
+ labels[i++] = "&";
+ break;
+ case '"':
+ labels[i++] = """;
+ break;
+ case '\'':
+ labels[i++] = "'";
+ break;
case '\\':
labels[i++] = C_("keyboard label", "Backslash");
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]