[gnome-shell] app-display: Escape categories in filter labels



commit 5137cee3d6ac48559bab9917b219e77227efd822
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Feb 25 17:50:39 2011 +0100

    app-display: Escape categories in filter labels
    
    As gnome-shell now switched to use the menu file from gnome-menus,
    we no longer have direct control over category names. If such a name
    contains unescaped markup, the shell will crash when trying to create
    the filter label, so make sure to escape markup in category names.

 js/ui/appDisplay.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 91a3915..ebc19d1 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1,6 +1,7 @@
 /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
 
 const Clutter = imports.gi.Clutter;
+const GLib = imports.gi.GLib;
 const Gtk = imports.gi.Gtk;
 const Shell = imports.gi.Shell;
 const Lang = imports.lang;
@@ -143,7 +144,7 @@ ViewByCategories.prototype = {
     },
 
     _addFilter: function(name, num) {
-        let button = new St.Button({ label: name,
+        let button = new St.Button({ label: GLib.markup_escape_text (name, -1),
                                      style_class: 'app-filter',
                                      x_align: St.Align.START });
         this._filters.add(button, { expand: true, x_fill: true, y_fill: false });



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