about summary refs log tree commit diff stats
path: root/xombrero.c
diff options
context:
space:
mode:
authorJosh Rickmar <jrick@devio.us>2012-08-24 13:19:38 -0400
committerJosh Rickmar <jrick@devio.us>2012-08-24 13:19:38 -0400
commit1e24b42bc136b2cc0f06b6db1ae31472566ab541 (patch)
tree72a6055d96dd7d76f32a84124cdf73884425c1e7 /xombrero.c
parentf1f9d707f34b2b18b07abc3f7120fea1e69f4c40 (diff)
downloadxombrero-1e24b42bc136b2cc0f06b6db1ae31472566ab541.tar.gz
Specify action for the policy when returning TRUE from npd cb
Diffstat (limited to 'xombrero.c')
-rw-r--r--xombrero.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/xombrero.c b/xombrero.c
index 1ca2ccd..5dfad34 100644
--- a/xombrero.c
+++ b/xombrero.c
@@ -4836,6 +4836,7 @@ webview_npd_cb(WebKitWebView *wv, WebKitWebFrame *wf,
 	if (valid_url_type(uri)) {
 		show_oops(t, "Stopping attempt to load an invalid URI (possible"
 		    " bait and switch attack)");
+		webkit_web_policy_decision_ignore(pd);
 		return (TRUE);
 	}
 
@@ -4857,11 +4858,15 @@ webview_npd_cb(WebKitWebView *wv, WebKitWebFrame *wf,
 	}
 
 	/* If this is an xtp url, we don't load anything else. */
-	if (parse_xtp_url(t, uri))
+	if (parse_xtp_url(t, uri)) {
+		webkit_web_policy_decision_ignore(pd);
 		return (TRUE);
+	}
 
-	if (parse_custom_uri(t, uri))
+	if (parse_custom_uri(t, uri)) {
+		webkit_web_policy_decision_ignore(pd);
 		return (TRUE);
+	}
 
 	if ((t->mode == XT_MODE_HINT && t->new_tab) || t->ctrl_click) {
 		t->ctrl_click = 0;