From a95dfd010f973db05f8c5107ca4227a83a784349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Tue, 3 Feb 2026 15:03:53 -0800 Subject: [PATCH 1/2] AgendaEventRow: escape location description text --- core/Utils.vala | 7 +++++++ src/Widgets/AgendaEventRow.vala | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/core/Utils.vala b/core/Utils.vala index d3dcb2a83..70c58201f 100644 --- a/core/Utils.vala +++ b/core/Utils.vala @@ -100,4 +100,11 @@ namespace Maya.Util { var result = original_uid.dup (); return result.reverse (); } + + public static string escape_markup (string escaped_text) { + return escaped_text.replace ("&", "&") + .replace ("<", "<") + .replace (">", ">") + .replace ("'", "'"); + } } diff --git a/src/Widgets/AgendaEventRow.vala b/src/Widgets/AgendaEventRow.vala index 80e39b599..6e531bd0f 100644 --- a/src/Widgets/AgendaEventRow.vala +++ b/src/Widgets/AgendaEventRow.vala @@ -373,7 +373,7 @@ public class Maya.View.AgendaEventRow : Gtk.ListBoxRow { string location_description, location_uri; if (location_from_component (event, out location_description, out location_uri)) { if (location_uri != "") { - location_label.label = "%s".printf (location_uri, location_description); + location_label.label = "%s".printf (location_uri, Util.escape_markup (location_description)); } else { location_label.label = location_description; } From 3c215a421f9bf0be44b9e58348ac71eb5fb8499a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Mon, 16 Feb 2026 12:55:59 -0800 Subject: [PATCH 2/2] Use GLib function --- core/Utils.vala | 7 ------- src/Widgets/AgendaEventRow.vala | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/core/Utils.vala b/core/Utils.vala index 70c58201f..d3dcb2a83 100644 --- a/core/Utils.vala +++ b/core/Utils.vala @@ -100,11 +100,4 @@ namespace Maya.Util { var result = original_uid.dup (); return result.reverse (); } - - public static string escape_markup (string escaped_text) { - return escaped_text.replace ("&", "&") - .replace ("<", "<") - .replace (">", ">") - .replace ("'", "'"); - } } diff --git a/src/Widgets/AgendaEventRow.vala b/src/Widgets/AgendaEventRow.vala index 7fda2c5f4..080fdad8f 100644 --- a/src/Widgets/AgendaEventRow.vala +++ b/src/Widgets/AgendaEventRow.vala @@ -332,7 +332,7 @@ public class Maya.View.AgendaEventRow : Gtk.ListBoxRow { string location_description, location_uri; if (location_from_component (event, out location_description, out location_uri)) { if (location_uri != "") { - location_label.label = "%s".printf (location_uri, Util.escape_markup (location_description)); + location_label.label = "%s".printf (location_uri, Markup.escape_text (location_description)); } else { location_label.label = location_description; }