[gtk+] shortcuts window: Fix handling of significant xml chars
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] shortcuts window: Fix handling of significant xml chars
- Date: Sun, 19 Jun 2016 21:50:25 +0000 (UTC)
commit 1c6b878e090666898acd16664851d82067fb5c9e
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]