Skip to content

Commit 5f8a44e

Browse files
committed
Escape HTML in group names (#25)
1 parent 6fe0aeb commit 5f8a44e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

printerproperties.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
from gi.repository import GObject
3636
from gi.repository import GLib
3737
from gui import GtkGUI
38+
import html # requires python3.2
3839
from optionwidgets import OptionWidget
3940
from debug import *
4041
import authconn
@@ -1733,7 +1734,8 @@ def fillPrinterOptions(self, name, editable):
17331734
self.static_tabs)
17341735
tab_label = self.lblPInstallOptions
17351736
else:
1736-
frame = Gtk.Frame(label="<b>%s</b>" % ppdippstr.ppd.get (group.text))
1737+
group_name = ppdippstr.ppd.get (group.text)
1738+
frame = Gtk.Frame(label="<b>%s</b>" % html.escape (group_name))
17371739
frame.get_label_widget().set_use_markup(True)
17381740
frame.set_shadow_type (Gtk.ShadowType.NONE)
17391741
self.vbPOptions.pack_start (frame, False, False, 0)

0 commit comments

Comments
 (0)