Commit 76f33af5 authored by Craig Kelly's avatar Craig Kelly Committed by Rui Matos

Escape text sent to set_markup

https://bugzilla.gnome.org/show_bug.cgi?id=749449
parent 1b5e742a
......@@ -55,9 +55,10 @@ class _ShellExtensionTweak(Gtk.ListBoxRow, Tweak):
vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
lbl_name = Gtk.Label(xalign=0.0)
lbl_name.set_markup("<span size='medium'><b>"+ext["name"].lower().capitalize()+"</b></span>")
name_markup = GLib.markup_escape_text(ext["name"].lower().capitalize())
lbl_name.set_markup("<span size='medium'><b>"+name_markup+"</b></span>")
lbl_desc = Gtk.Label(xalign=0.0)
desc = ext["description"].lower().capitalize().split('\n')[0]
desc = GLib.markup_escape_text(ext["description"].lower().capitalize().split('\n')[0])
lbl_desc.set_markup("<span foreground='#A19C9C' size='small'>"+desc+"</span>")
lbl_desc.props.ellipsize = Pango.EllipsizeMode.END
......
......@@ -491,7 +491,7 @@ class DarkThemeSwitcher(Gtk.Box, Tweak):
lbl_des = Gtk.Label()
lbl_des.props.xalign = 0.0
lbl_des.set_markup("<span size='x-small'>"+description+"</span>")
lbl_des.set_markup("<span size='x-small'>"+GLib.markup_escape_text(description)+"</span>")
self.pack_start(hbox, False, False, 0)
self.pack_start(lbl_des, False, False,0)
......@@ -511,7 +511,7 @@ class Title(Gtk.Box, Tweak):
Gtk.Box.__init__(self, orientation=Gtk.Orientation.HORIZONTAL)
Tweak.__init__(self, name, desc, **options)
widget = Gtk.Label()
widget.set_markup("<b>"+name+"</b>")
widget.set_markup("<b>"+GLib.markup_escape_text(name)+"</b>")
widget.props.xalign = 0.0
self.add(widget)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment