[hamster-applet] escaping input before calling set_markup. fixes bug 607372



commit 6db4622f8be24ca818f60bf28c4917f812e6b9d3
Author: Toms Bauģis <toms baugis gmail com>
Date:   Mon Jan 18 23:00:26 2010 +0000

    escaping input before calling set_markup. fixes bug 607372

 hamster/widgets/facttree.py |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/hamster/widgets/facttree.py b/hamster/widgets/facttree.py
index d7f7244..ea06dd6 100644
--- a/hamster/widgets/facttree.py
+++ b/hamster/widgets/facttree.py
@@ -291,7 +291,7 @@ class FactCellRenderer(gtk.GenericCellRenderer):
 
             self.set_color(context, text_color)
 
-            self.layout.set_markup("<b>%s</b>" % parent["label"])
+            self.layout.set_markup("<b>%s</b>" % stuff.escape_pango(parent["label"]))
             if self.data["first"]:
                 y = 5
             else:
@@ -411,11 +411,11 @@ class FactCellRenderer(gtk.GenericCellRenderer):
         cell_width = cell_width - widget.longest_interval - widget.longest_duration
 
 
-        layout.set_markup(fact["name"])
+        layout.set_markup(stuff.escape_pango(fact["name"]))
         label_w, label_h = layout.get_pixel_size()
 
-        labels["activity"] = (fact["name"], cell_start, 2, -1)
-        labels["category"] = (" - <small>%s</small>" % fact["category"],
+        labels["activity"] = (stuff.escape_pango(fact["name"]), cell_start, 2, -1)
+        labels["category"] = (" - <small>%s</small>" % stuff.escape_pango(fact["category"]),
                               cell_start + label_w, 2, -1)
 
 
@@ -446,7 +446,7 @@ class FactCellRenderer(gtk.GenericCellRenderer):
         # see if we can fit in single line
         # if not, put description under activity
         if fact["description"]:
-            description = "<small>%s</small>" % fact["description"]
+            description = "<small>%s</small>" % stuff.escape_pango(fact["description"])
             layout.set_markup(description)
             label_w, label_h = layout.get_pixel_size()
 



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