[gnome-builder] libide/tweaks: escape group titles



commit f6d9b601a0bc3148a7b2b55d2a4696555d16a400
Author: Christian Hergert <chergert redhat com>
Date:   Fri Aug 12 15:14:25 2022 -0700

    libide/tweaks: escape group titles
    
    So that &amp; works without using &amp;amp;

 src/libide/tweaks/ide-tweaks-panel.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/libide/tweaks/ide-tweaks-panel.c b/src/libide/tweaks/ide-tweaks-panel.c
index a04b275d8..e1c8bc4e3 100644
--- a/src/libide/tweaks/ide-tweaks-panel.c
+++ b/src/libide/tweaks/ide-tweaks-panel.c
@@ -84,11 +84,16 @@ ide_tweaks_panel_visitor_cb (IdeTweaksItem *item,
   else if (IDE_IS_TWEAKS_GROUP (item))
     {
       IdeTweaksGroup *group = IDE_TWEAKS_GROUP (item);
+      g_autofree char *title_escaped = NULL;
+      const char *title;
+
+      if ((title = ide_tweaks_group_get_title (group)))
+        title_escaped = g_markup_escape_text (title, -1);
 
       self->current_list = NULL;
       self->current_list_has_non_rows = FALSE;
       self->current_group = g_object_new (ADW_TYPE_PREFERENCES_GROUP,
-                            "title", ide_tweaks_group_get_title (group),
+                            "title", title_escaped,
                             NULL);
       adw_preferences_page_add (self->prefs_page, self->current_group);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]