[pitivi: 1/3] effects: escape names and descriptions only where needed. Fixes #630370.
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi: 1/3] effects: escape names and descriptions only where needed. Fixes #630370.
- Date: Sat, 2 Oct 2010 20:50:27 +0000 (UTC)
commit 3541d423bbe772cc3e38ee9acf3598a2779a474f
Author: Alessandro Decina <alessandro d gmail com>
Date: Fri Oct 1 14:31:43 2010 +0200
effects: escape names and descriptions only where needed. Fixes #630370.
pitivi/effects.py | 5 ++---
pitivi/ui/effectlist.py | 9 ++++++---
2 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/pitivi/effects.py b/pitivi/effects.py
index e37f122..3d5e3c6 100644
--- a/pitivi/effects.py
+++ b/pitivi/effects.py
@@ -30,7 +30,6 @@ import gobject
import re
import os
-from xml.sax.saxutils import escape
from gettext import gettext as _
from pitivi.factories.operation import EffectFactory
@@ -196,7 +195,7 @@ class EffectsHandler(object):
@type element_factory: L{gst.ElementFactory}
@returns: A human description C{str} for the effect
"""
- return (escape(element_factory.get_description()))
+ return element_factory.get_description()
def _getEffectCategories(self, effect_name):
"""
@@ -243,7 +242,7 @@ class EffectsHandler(object):
effect = _("effect")
pipe = " |"
uselessWords = re.compile(video + pipe + audio + pipe + effect)
- return uselessWords.sub("", (escape(element_factory.get_longname()))).title()
+ return uselessWords.sub("", element_factory.get_longname()).title()
def getVideoCategories(self, aware=True):
"""
diff --git a/pitivi/ui/effectlist.py b/pitivi/ui/effectlist.py
index 1101302..3d05d65 100644
--- a/pitivi/ui/effectlist.py
+++ b/pitivi/ui/effectlist.py
@@ -25,6 +25,7 @@ import os
import time
from gettext import gettext as _
+from xml.sax.saxutils import escape
import pitivi.ui.dnd as dnd
@@ -282,9 +283,11 @@ class EffectList(gtk.VBox, Loggable):
icon = self.app.effects.getEffectIcon(name)
self._current_tooltip_icon = icon
- longname = self.modelFilter.get_value(context[2], COL_NAME_TEXT).strip()
- txt = "<b>%s:</b>\n%s" % (longname,
- self.modelFilter.get_value(context[2], COL_DESC_TEXT))
+ longname = escape(self.modelFilter.get_value(context[2],
+ COL_NAME_TEXT).strip())
+ description = escape(self.modelFilter.get_value(context[2],
+ COL_DESC_TEXT))
+ txt = "<b>%s:</b>\n%s" % (longname, description)
tooltip.set_icon(self._current_tooltip_icon)
tooltip.set_markup(txt)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]