Uzbl

Tasklist

FS#106 - href fails when contains javascript

Attached to Project: Uzbl
Opened by Anonymous Submitter - 2009-09-04 06:45:18 PM
Task Type Bug Report
Category uzbl-core
Status Unconfirmed
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version Development
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

when links have an `href' attribute that contains javascript code (that typically call window.open (...)), uzbl try to `run_handler' with the javascript code as uri. This leads to a new window without any content.
I don't know much about glib or webkit, but for now the only way for me to makes it work was to add that lines in the create_web_view_cb callback:

--- uzbl.c 2009-09-04 20:34:56.000000000 +0200
+++ uzbl.nopatch.c 2009-09-04 20:35:59.000000000 +0200
@@ -558,8 +558,6 @@
if (uzbl.state.selected_url != NULL) {
if (uzbl.state.verbose)
printf("\nNew web view -> %s\n",uzbl.state.selected_url);
- if (!strncmp (uzbl.state.selected_url, "javascript:", 11))
- return web_view;
new_window_load_uri(uzbl.state.selected_url);
} else {
if (uzbl.state.verbose)

this leads uzbl to display the href in its own window instead of a new one, but hey ...

This task depends upon

Loading...