mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
onsubmit: Reverted commit fa93d05b7e
.
I don't remember why I cleared "returns", but it doesn't work with www.hypermedia.pl/altkom/ and probably with many more sites.
This commit is contained in:
parent
6da89f7acc
commit
e887efc611
@ -923,17 +923,12 @@ call_onsubmit_and_submit(struct session *ses, struct document_view *doc_view,
|
||||
if (init_string(&code)) {
|
||||
struct view_state *vs = doc_view->vs;
|
||||
struct ecmascript_interpreter *interpreter;
|
||||
unsigned char *ret = fc->form->onsubmit;
|
||||
int res;
|
||||
|
||||
if (vs->ecmascript_fragile)
|
||||
ecmascript_reset_state(vs);
|
||||
interpreter = vs->ecmascript;
|
||||
assert(interpreter);
|
||||
/* SEE and SpiderMonkey do not like return outside
|
||||
* functions. */
|
||||
while ((ret = strstr(ret, "return ")))
|
||||
while (*ret != ' ') *ret++ = ' ';
|
||||
|
||||
add_to_string(&code, fc->form->onsubmit);
|
||||
res = ecmascript_eval_boolback(interpreter, &code);
|
||||
|
Loading…
Reference in New Issue
Block a user