aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-web-view.c
diff options
context:
space:
mode:
authorXan Lopez <xan@gnome.org>2009-12-14 06:57:30 +0800
committerXan Lopez <xan@gnome.org>2009-12-14 06:57:30 +0800
commit27d6a609d43ec2e6a7a5ee27809a79263af089ad (patch)
treecf76115ea1fb22853cd4b20fb2b871ac9a52034e /embed/ephy-web-view.c
parentf89e7385d0a0c34669a69c057aed9643c0c13fbb (diff)
downloadgsoc2013-epiphany-27d6a609d43ec2e6a7a5ee27809a79263af089ad.tar.gz
gsoc2013-epiphany-27d6a609d43ec2e6a7a5ee27809a79263af089ad.tar.zst
gsoc2013-epiphany-27d6a609d43ec2e6a7a5ee27809a79263af089ad.zip
ephy-web-view: url-decode javascript URIs before executing them
Fixes Amazon Add to Wishlist bookmark. Bug #604489
Diffstat (limited to 'embed/ephy-web-view.c')
-rw-r--r--embed/ephy-web-view.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 6fd1a4da5..e045a1d55 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -1209,9 +1209,13 @@ ephy_web_view_load_url (EphyWebView *view,
effective_url = normalize_or_autosearch_url (view, url);
- if (g_str_has_prefix (effective_url, "javascript:"))
- webkit_web_view_execute_script (WEBKIT_WEB_VIEW (view), effective_url);
- else
+ if (g_str_has_prefix (effective_url, "javascript:")) {
+ char *decoded_url;
+
+ decoded_url = soup_uri_decode (effective_url);
+ webkit_web_view_execute_script (WEBKIT_WEB_VIEW (view), decoded_url);
+ g_free (decoded_url);
+ } else
webkit_web_view_open (WEBKIT_WEB_VIEW (view), effective_url);
g_free (effective_url);