diff options
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | file.c | 17 | ||||
-rw-r--r-- | form.c | 6 | ||||
-rw-r--r-- | main.c | 8 |
4 files changed, 36 insertions, 7 deletions
@@ -1,5 +1,15 @@ 2001-12-28 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp> + * [w3m-dev 02770] form element outside <form>..</form> + * main.c (_followForm): check whether parent action is "none" + * form.c (internal_action): add "none" + * form.c (do_internal): check internal_action[i].rout + * file.c (process_input): check cur_form_id + * file.c (process_select): ditto + * file.c (process_textarea): ditto + +2001-12-28 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp> + * [w3m-dev 02769] <form>..</form> as block element * file.c (HTMLtagproc1): CLOSE_P for <form>...</form> * table.c (feed_table_tag): add feed_table_block_tag for <form></form> @@ -1738,4 +1748,4 @@ * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.193 2001/12/27 17:56:02 ukai Exp $ +$Id: ChangeLog,v 1.194 2001/12/27 18:01:52 ukai Exp $ @@ -1,4 +1,4 @@ -/* $Id: file.c,v 1.38 2001/12/27 17:56:03 ukai Exp $ */ +/* $Id: file.c,v 1.39 2001/12/27 18:01:52 ukai Exp $ */ #include "fm.h" #include <sys/types.h> #include "myctype.h" @@ -2406,6 +2406,11 @@ process_input(struct parsed_tag *tag) char *qq = ""; int qlen = 0; + if (cur_form_id < 0) { + char *s = "<form_int method=internal action=none>"; + process_form(parse_tag(&s, TRUE)); + } + p = "text"; parsedtag_get_value(tag, ATTR_TYPE, &p); q = NULL; @@ -2578,6 +2583,11 @@ process_select(struct parsed_tag *tag) { char *p; + if (cur_form_id < 0) { + char *s = "<form_int method=internal action=none>"; + process_form(parse_tag(&s, TRUE)); + } + p = ""; parsedtag_get_value(tag, ATTR_NAME, &p); cur_select = Strnew_charp(p); @@ -2742,6 +2752,11 @@ process_textarea(struct parsed_tag *tag, int width) { char *p; + if (cur_form_id < 0) { + char *s = "<form_int method=internal action=none>"; + process_form(parse_tag(&s, TRUE)); + } + p = ""; parsedtag_get_value(tag, ATTR_NAME, &p); cur_textarea = Strnew_charp(p); @@ -1,4 +1,4 @@ -/* $Id: form.c,v 1.9 2001/12/27 17:37:49 ukai Exp $ */ +/* $Id: form.c,v 1.10 2001/12/27 18:01:52 ukai Exp $ */ /* * HTML forms */ @@ -31,6 +31,7 @@ struct { #ifdef USE_COOKIE {"cookie", set_cookie_flag}, #endif /* USE_COOKIE */ + {"none", NULL}, {NULL, NULL}, }; /* *INDENT-ON* */ @@ -510,7 +511,8 @@ do_internal(char *action, char *data) for (i = 0; internal_action[i].action; i++) { if (strcasecmp(internal_action[i].action, action) == 0) { - internal_action[i].rout(cgistr2tagarg(data)); + if (internal_action[i].rout) + internal_action[i].rout(cgistr2tagarg(data)); return; } } @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.52 2001/12/27 17:43:24 ukai Exp $ */ +/* $Id: main.c,v 1.53 2001/12/27 18:01:52 ukai Exp $ */ #define MAINPROGRAM #include "fm.h" #include <signal.h> @@ -3020,9 +3020,11 @@ _followForm(int submit) buf->form_submit = save_submit_formlist(fi); } } - else if ((fi->parent->method == FORM_METHOD_INTERNAL && Strcmp_charp(fi->parent->action, "map") == 0) || Currentbuf->bufferprop & BP_INTERNAL) { /* internal */ + else if ((fi->parent->method == FORM_METHOD_INTERNAL && + (!Strcmp_charp(fi->parent->action, "map") || + !Strcmp_charp(fi->parent->action, "none"))) || + Currentbuf->bufferprop & BP_INTERNAL) { /* internal */ do_internal(tmp2->ptr, tmp->ptr); - return; } else { disp_err_message("Can't send form because of illegal method.", |