Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions core/Utils.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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 ("<", "&lt;")
.replace (">", "&gt;")
.replace ("'", "&#39;");
}
}
2 changes: 1 addition & 1 deletion src/Widgets/AgendaEventRow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<a href=\"%s\">%s</a>".printf (location_uri, location_description);
location_label.label = "<a href=\"%s\">%s</a>".printf (location_uri, Util.escape_markup (location_description));
Copy link
Collaborator

@leonardo-lemos leonardo-lemos Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use GLib.Markup.escape_text () here instead?

} else {
location_label.label = location_description;
}
Expand Down