Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2006-06-16 06:36:18 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2006-06-16 06:36:18 (GMT)
commita6b2b4981c4bf78c023d9b5cb94159cd20d03672 (patch)
tree831426f8a3f8ffdefdc94d41cf6950cff315adbf /sugar
parent7eeb43b98a79b5bc613841ff480cf4198c3b6c2b (diff)
More unescaping...
Diffstat (limited to 'sugar')
-rw-r--r--sugar/shell/StartPage.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/sugar/shell/StartPage.py b/sugar/shell/StartPage.py
index 1a388cd..890b3cb 100644
--- a/sugar/shell/StartPage.py
+++ b/sugar/shell/StartPage.py
@@ -5,6 +5,7 @@ import pango
import dbus
import cgi
import urllib
+import re
import google
from sugar.presence.PresenceService import PresenceService
@@ -46,8 +47,8 @@ class ActivitiesView(gtk.TreeView):
if subtitle is None:
subtitle = model.get_value(it, 1)
- markup = '<big><b>' + title + '</b></big>' + '\n' + subtitle
- markup = cgi.escape(markup) # escape the markup
+ markup = '<big><b>' + cgi.escape(title) + '</b></big>'
+ markup += '\n' + cgi.escape(subtitle)
cell.set_property('markup', markup)
cell.set_property('ellipsize', pango.ELLIPSIZE_END)
@@ -138,5 +139,16 @@ class StartPage(gtk.HBox):
model = ActivitiesModel()
for result in data.results:
- model.add_web_page(result.title, result.URL)
+ title = result.title
+
+ # FIXME what tags should we actually strip?
+ title = title.replace('<b>', '')
+ title = title.replace('</b>', '')
+
+ # FIXME I'm sure there is a better way to
+ # unescape these.
+ title = title.replace('&quot;', '"')
+ title = title.replace('&amp;', '&')
+
+ model.add_web_page(title, result.URL)
self._activities.set_model(model)