diff options
Diffstat (limited to 'ccsm-escape-fix.patch')
-rw-r--r-- | ccsm-escape-fix.patch | 138 |
1 files changed, 138 insertions, 0 deletions
diff --git a/ccsm-escape-fix.patch b/ccsm-escape-fix.patch new file mode 100644 index 000000000000..a1d20492fb7e --- /dev/null +++ b/ccsm-escape-fix.patch @@ -0,0 +1,138 @@ +diff --unified --recursive --text compiz-0.9.14.0/compizconfig/ccsm/ccm/Pages.py compiz-0.9.14.0-new/compizconfig/ccsm/ccm/Pages.py +--- compiz-0.9.14.0/compizconfig/ccsm/ccm/Pages.py 2019-02-16 18:14:41.000000000 +0530 ++++ compiz-0.9.14.0-new/compizconfig/ccsm/ccm/Pages.py 2019-11-17 10:36:48.719451182 +0530 +@@ -33,7 +33,7 @@ + from ccm.Utils import gtk_process_events, getScreens, Image, PrettyButton, Label, NotFoundBox, GlobalUpdater, CategoryKeyFunc, GroupIndexKeyFunc, PluginKeyFunc, GetSettings, GetAcceleratorName + from ccm.Widgets import ClearEntry, PluginView, GroupView, SelectorButtons, ScrolledList, Popup, KeyGrabber, AboutDialog, PluginWindow + +-from cgi import escape as protect_pango_markup ++from html import escape as protect_pango_markup + + import os + +@@ -397,7 +397,7 @@ + for index, n in enumerate(context.Plugins): + plugin = context.Plugins[n] + bar.set_fraction((index+1)/float(length)) +- label.set_markup("<i>%s</i>" %protect_pango_markup(plugin.ShortDesc)) ++ label.set_markup("<i>%s</i>" %protect_pango_markup(plugin.ShortDesc, quote=False)) + gtk_process_events() + + groups = [] +@@ -1383,7 +1383,7 @@ + self.VisibleAreas = self.subGroupAreas = [] + self.Label = Gtk.Alignment(xalign=0.0, yalign=0.5) + self.Label.set_padding(4, 4, 4, 4) +- label = Gtk.Label(label="<b>%s</b>" % (protect_pango_markup(name or _('General')))) ++ label = Gtk.Label(label="<b>%s</b>" % (protect_pango_markup(name or _('General'), quote=False))) + label.set_use_markup(True) + label.set_xalign(0.0) + self.Label.add(label) +diff --unified --recursive --text compiz-0.9.14.0/compizconfig/ccsm/ccm/Settings.py compiz-0.9.14.0-new/compizconfig/ccsm/ccm/Settings.py +--- compiz-0.9.14.0/compizconfig/ccsm/ccm/Settings.py 2019-02-16 18:14:41.000000000 +0530 ++++ compiz-0.9.14.0-new/compizconfig/ccsm/ccm/Settings.py 2019-11-17 10:36:48.719451182 +0530 +@@ -29,7 +29,7 @@ + from ccm.Widgets import CellRendererColor, ModifierSelector, SingleEdgeSelector, KeyGrabber, MatchButton, FileButton, ErrorDialog + from ccm.Utils import Image, ActionImage, SizedButton, GlobalUpdater, PureVirtualError, SettingKeyFunc, EnumSettingKeyFunc, HasOnlyType, GetSettings, GetAcceleratorName + +-from cgi import escape as protect_pango_markup ++from html import escape as protect_pango_markup + + import locale + import gettext +@@ -110,7 +110,7 @@ + return + + label = Gtk.Label() +- desc = protect_pango_markup (self.Setting.ShortDesc) ++ desc = protect_pango_markup (self.Setting.ShortDesc, quote=False) + style = "%s" + if self.Setting.Integrated: + style = "<i>%s</i>" +@@ -966,7 +966,7 @@ + def HandleDialogText (self, accel): + name = self.ReorderKeyString (accel) + if len (accel) != len (name): +- accel = protect_pango_markup (accel) ++ accel = protect_pango_markup (accel, quote=False) + ErrorDialog (self.Widget.get_toplevel (), + _("\"%s\" is not a valid shortcut") % accel) + return +@@ -1149,7 +1149,7 @@ + + def HandleDialogText (self, button): + def ShowErrorDialog (button): +- button = protect_pango_markup (button) ++ button = protect_pango_markup (button, quote=False) + ErrorDialog (self.Widget.get_toplevel (), + _("\"%s\" is not a valid button") % button) + if button.lower ().strip () in ("", "disabled", "none"): +@@ -1330,7 +1330,7 @@ + valid = False + break + if not valid: +- mask = protect_pango_markup (mask) ++ mask = protect_pango_markup (mask, quote=False) + ErrorDialog (self.Widget.get_toplevel (), + _("\"%s\" is not a valid edge mask") % mask) + return +diff --unified --recursive --text compiz-0.9.14.0/compizconfig/ccsm/ccm/Utils.py compiz-0.9.14.0-new/compizconfig/ccsm/ccm/Utils.py +--- compiz-0.9.14.0/compizconfig/ccsm/ccm/Utils.py 2019-02-16 18:14:41.000000000 +0530 ++++ compiz-0.9.14.0-new/compizconfig/ccsm/ccm/Utils.py 2019-11-17 10:36:48.719451182 +0530 +@@ -27,7 +27,7 @@ + import weakref + + from ccm.Constants import ImageNone, ImagePlugin, ImageCategory, ImageThemed, ImageStock, DataDir, IconDir +-from cgi import escape as protect_pango_markup ++from html import escape as protect_pango_markup + import operator + + import locale +@@ -57,7 +57,7 @@ + return Gdk.Screen.get_default().get_number() + + def protect_markup_dict (dict_): +- return dict((k, protect_pango_markup (v)) for (k, v) in dict_.items()) ++ return dict((k, protect_pango_markup (v, quote=False)) for (k, v) in dict_.items()) + + class Image (Gtk.Image): + +@@ -187,7 +187,7 @@ + box = Gtk.HBox() + self.Warning = Gtk.Label() + self.Markup = _("<span size=\"large\"><b>No matches found.</b> </span><span>\n\n Your filter \"<b>%s</b>\" does not match any items.</span>") +- value = protect_pango_markup(value) ++ value = protect_pango_markup(value, quote=False) + self.Warning.set_markup(self.Markup % value) + image = Image("face-surprise", ImageThemed, 48) + +@@ -196,7 +196,7 @@ + self.add(box) + + def update(self, value): +- value = protect_pango_markup(value) ++ value = protect_pango_markup(value, quote=False) + self.Warning.set_markup(self.Markup % value) + + class IdleSettingsParser: +diff --unified --recursive --text compiz-0.9.14.0/compizconfig/ccsm/ccm/Widgets.py compiz-0.9.14.0-new/compizconfig/ccsm/ccm/Widgets.py +--- compiz-0.9.14.0/compizconfig/ccsm/ccm/Widgets.py 2019-02-16 18:14:41.000000000 +0530 ++++ compiz-0.9.14.0-new/compizconfig/ccsm/ccm/Widgets.py 2019-11-17 10:36:48.719451182 +0530 +@@ -27,7 +27,7 @@ + from gi.repository import PangoCairo + from gi.repository import GdkPixbuf + import cairo +-from cgi import escape as protect_pango_markup ++from html import escape as protect_pango_markup + from math import pi, sqrt + import time + import os +@@ -295,7 +295,7 @@ + def add_item(self, item, callback, markup="%s", image=None, info=None): + button = Gtk.Button() + label = Label(wrap=170) +- text = protect_pango_markup(item) ++ text = protect_pango_markup(item, quote=False) + label.set_markup(markup % text or _("General")) + labelBox = Gtk.VBox() + labelBox.set_spacing(5)
\ No newline at end of file |