Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/webtoolbar.py
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2007-09-03 14:27:44 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2007-09-03 14:27:44 (GMT)
commite8549d91315dc9dbdc84c750d39bcc4a477c893e (patch)
treee1d35ba6c6474a654f4bd9e62a054d4499739d41 /webtoolbar.py
parent08d650a1b46df5002cc8eb71d0cb3a6d47a87960 (diff)
Unescape the address bar URI
Diffstat (limited to 'webtoolbar.py')
-rwxr-xr-xwebtoolbar.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/webtoolbar.py b/webtoolbar.py
index 6735a9c..3623808 100755
--- a/webtoolbar.py
+++ b/webtoolbar.py
@@ -21,8 +21,8 @@ from gettext import gettext as _
import gobject
import gtk
-import xpcom
from xpcom.components import interfaces
+from xpcom import components
from sugar.graphics.toolbutton import ToolButton
from sugar._sugaruiext import AddressEntry
@@ -88,7 +88,11 @@ class WebToolbar(gtk.Toolbar):
gobject.idle_add(self._reload_session_history, current_page_index)
def _location_changed_cb(self, progress_listener, uri):
- self._set_address(uri)
+ cls = components.classes['@mozilla.org/intl/texttosuburi;1']
+ texttosuburi = cls.getService(interfaces.nsITextToSubURI)
+ ui_uri = texttosuburi.unEscapeURIForUI(uri.originCharset, uri.spec)
+
+ self._set_address(ui_uri)
self._update_navigation_buttons()
filepicker.cleanup_temp_files()