aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-web-view.c
diff options
context:
space:
mode:
authorChris Lamb <lamby@debian.org>2009-10-11 23:44:44 +0800
committerXan Lopez <xan@gnome.org>2009-10-19 00:25:17 +0800
commit437e08e9303dfe186d14b1cd3b2e9226c61feb4e (patch)
tree5952ad4401374da504d5fa2e952a0c3b370cc8c8 /embed/ephy-web-view.c
parent81b8ace84e3485765491a26ccbfa033d577a13b9 (diff)
downloadgsoc2013-epiphany-437e08e9303dfe186d14b1cd3b2e9226c61feb4e.tar
gsoc2013-epiphany-437e08e9303dfe186d14b1cd3b2e9226c61feb4e.tar.gz
gsoc2013-epiphany-437e08e9303dfe186d14b1cd3b2e9226c61feb4e.tar.bz2
gsoc2013-epiphany-437e08e9303dfe186d14b1cd3b2e9226c61feb4e.tar.lz
gsoc2013-epiphany-437e08e9303dfe186d14b1cd3b2e9226c61feb4e.tar.xz
gsoc2013-epiphany-437e08e9303dfe186d14b1cd3b2e9226c61feb4e.tar.zst
gsoc2013-epiphany-437e08e9303dfe186d14b1cd3b2e9226c61feb4e.zip
Execute "javascript:" URIs instead of browsing for them.
Signed-off-by: Xan Lopez <xan@gnome.org>
Diffstat (limited to 'embed/ephy-web-view.c')
-rw-r--r--embed/ephy-web-view.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index acf3e5f0b..0d3be0d8f 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -1118,7 +1118,10 @@ ephy_web_view_load_url (EphyWebView *view,
} else
effective_url = ephy_embed_utils_normalize_address (url);
- webkit_web_view_open (WEBKIT_WEB_VIEW (view), effective_url);
+ if (g_str_has_prefix (effective_url, "javascript:"))
+ webkit_web_view_execute_script (WEBKIT_WEB_VIEW (view), effective_url);
+ else
+ webkit_web_view_open (WEBKIT_WEB_VIEW (view), effective_url);
if (soup_uri)
soup_uri_free (soup_uri);