summaryrefslogtreecommitdiff
path: root/riscos/plugin.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2005-02-03 10:04:06 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2005-02-03 10:04:06 +0000
commita17aa7d47fa3fd081ef838ccf7e4a16537b4a234 (patch)
treefbfc2a1f38f46e772290673c4d9ae4e4fb497d06 /riscos/plugin.c
parent42ab950b138ef9f8f0c87b9dbc0d196bbf1c7cd2 (diff)
downloadnetsurf-a17aa7d47fa3fd081ef838ccf7e4a16537b4a234.tar.gz
netsurf-a17aa7d47fa3fd081ef838ccf7e4a16537b4a234.tar.bz2
[project @ 2005-02-03 10:04:06 by jmb]
Fix issue with plugins embedded in a page requesting fetch of the same page on load. Add option to block popups. svn path=/import/netsurf/; revision=1482
Diffstat (limited to 'riscos/plugin.c')
-rw-r--r--riscos/plugin.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/riscos/plugin.c b/riscos/plugin.c
index 03692c262..828bc0c92 100644
--- a/riscos/plugin.c
+++ b/riscos/plugin.c
@@ -796,13 +796,22 @@ void plugin_url_access(wimp_message *message)
* other window names
*/
if (!post) { /* GET request */
- if (strcasecmp(window, "_self") == 0 ||
+ if (strcasecmp(url,
+ c->data.plugin.bw->current_content->url) &&
+ (strcasecmp(window, "_self") == 0 ||
strcasecmp(window, "_parent") == 0 ||
strcasecmp(window, "_top") == 0 ||
- strcasecmp(window, "") == 0) {
+ strcasecmp(window, "") == 0)) {
+ /* only open in current window if not
+ * already at the URL requested, else you
+ * end up in an infinite loop of fetching
+ * the same page
+ */
browser_window_go(c->data.plugin.bw, url, 0);
}
- else if (strcasecmp(window, "_blank") == 0) {
+ else if (!option_block_popups &&
+ strcasecmp(window, "_blank") == 0) {
+ /* don't do this if popups are blocked */
browser_window_create(url, NULL, 0);
}
}