From a90071fef5e626e31c196d7c93e0722facd57e01 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 16 Jun 2006 22:23:19 -0400 Subject: [PATCH] Use better escape function --- sugar/browser/BrowserActivity.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sugar/browser/BrowserActivity.py b/sugar/browser/BrowserActivity.py index 5a1530d6..185b6f4d 100644 --- a/sugar/browser/BrowserActivity.py +++ b/sugar/browser/BrowserActivity.py @@ -3,7 +3,7 @@ import pygtk pygtk.require('2.0') import gtk import geckoembed -import urllib +import xml.sax.saxutils from sugar.shell import activity from sugar.browser import NotificationBar @@ -98,8 +98,8 @@ class BrowserActivity(activity.Activity): return self.embed def publish(self): - escaped_title = urllib.quote(self.embed.get_title()) - escaped_url = urllib.quote(self.embed.get_address()) + escaped_title = xml.sax.saxutils.escape(self.embed.get_title()) + escaped_url = xml.sax.saxutils.escape(self.embed.get_address()) # Publish ourselves on the network properties = {_SERVICE_URI_TAG: escaped_url, _SERVICE_TITLE_TAG: escaped_title}