1
0
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:
Witold Filipczyk 2007-05-19 18:47:20 +02:00 committed by Witold Filipczyk
parent 6da89f7acc
commit e887efc611

View File

@ -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);