w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

commit 82e47063f088ff25313eb88ab803ecfc163f7984
parent c946bcee74700f56299971e39e8195dd02d08318
Author: ukai <ukai>
Date:   Thu, 27 Dec 2001 18:01:52 +0000

[w3m-dev 02770] form element outside <form>..</form>
From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>

Diffstat:
MChangeLog | 10++++++++++
Mfile.c | 15+++++++++++++++
Mform.c | 4+++-
Mmain.c | 6++++--
4 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -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> diff --git a/file.c b/file.c @@ -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); diff --git a/form.c b/form.c @@ -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; } } diff --git a/main.c b/main.c @@ -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.",