aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2001-12-27 18:01:52 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2001-12-27 18:01:52 +0000
commit0fb25226f1c253e6dd1680f598c6b8c6a5306ec4 (patch)
tree1fbe2e593bbddffe501c7fab79e01b93af43aed6
parent[w3m-dev 02769] <form>..</form> as block element (diff)
downloadw3m-0fb25226f1c253e6dd1680f598c6b8c6a5306ec4.tar.gz
w3m-0fb25226f1c253e6dd1680f598c6b8c6a5306ec4.zip
[w3m-dev 02770] form element outside <form>..</form>
From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to '')
-rw-r--r--ChangeLog12
-rw-r--r--file.c17
-rw-r--r--form.c6
-rw-r--r--main.c8
4 files changed, 36 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 0a90e9d..0606a99 100644
--- 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>
@@ -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 $
diff --git a/file.c b/file.c
index 0ec6756..9710d14 100644
--- a/file.c
+++ b/file.c
@@ -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);
diff --git a/form.c b/form.c
index 825189d..2fa0de2 100644
--- a/form.c
+++ b/form.c
@@ -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;
}
}
diff --git a/main.c b/main.c
index d650f1c..1f3df11 100644
--- a/main.c
+++ b/main.c
@@ -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.",