summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@centraldogma>2011-09-23 16:12:27 +0200
committercinap_lenrek <cinap_lenrek@centraldogma>2011-09-23 16:12:27 +0200
commitcec4e59dee19b398d95bc6e0d8ece2acdd0c8d84 (patch)
tree423260bd96b1d8e4f5934b99533e362f883835b7 /sys
parenta8fdcbf3a2e100f1e8f2ee30bead4d0ed0172b41 (diff)
mothra: button tag, email input type
Diffstat (limited to 'sys')
-rw-r--r--sys/src/cmd/mothra/forms.c5
-rw-r--r--sys/src/cmd/mothra/html.h1
-rw-r--r--sys/src/cmd/mothra/html.syntax.c1
-rw-r--r--sys/src/cmd/mothra/rdhtml.c1
4 files changed, 7 insertions, 1 deletions
diff --git a/sys/src/cmd/mothra/forms.c b/sys/src/cmd/mothra/forms.c
index 880b3c826..a68b972eb 100644
--- a/sys/src/cmd/mothra/forms.c
+++ b/sys/src/cmd/mothra/forms.c
@@ -118,6 +118,7 @@ void rdform(Hglob *g){
break;
case Tag_input:
+ case Tag_button:
if(g->form==0){
BadTag:
htmlerror(g->name, g->lineno, "<%s> not in form, ignored\n",
@@ -148,7 +149,9 @@ void rdform(Hglob *g){
f->maxlength=atoi(s);
s=pl_getattr(g->attr, "type");
/* bug -- password treated as text */
- if(s==0 || cistrcmp(s, "text")==0 || cistrcmp(s, "password")==0 || cistrcmp(s, "int")==0){
+ if(s==0 || cistrcmp(s, "text")==0 ||
+ cistrcmp(s, "password")==0 || cistrcmp(s, "int")==0 ||
+ cistrcmp(s, "email")==0){
s=pl_getattr(g->attr, "name");
if(s!=0 && strcmp(s, "isindex")==0)
f->type=INDEX;
diff --git a/sys/src/cmd/mothra/html.h b/sys/src/cmd/mothra/html.h
index fb2aaabfa..6af44a6ad 100644
--- a/sys/src/cmd/mothra/html.h
+++ b/sys/src/cmd/mothra/html.h
@@ -127,6 +127,7 @@ enum{
Tag_blockquot,
Tag_body,
Tag_br,
+ Tag_button,
Tag_center,
Tag_cite,
Tag_code,
diff --git a/sys/src/cmd/mothra/html.syntax.c b/sys/src/cmd/mothra/html.syntax.c
index cfbb1d894..9677d60f7 100644
--- a/sys/src/cmd/mothra/html.syntax.c
+++ b/sys/src/cmd/mothra/html.syntax.c
@@ -14,6 +14,7 @@ Tag tag[]={
[Tag_blockquot] "blockquote", END,
[Tag_body] "body", END, /* OPTEND */
[Tag_br] "br", NOEND,
+[Tag_button] "button", END,
[Tag_center] "center", END,
[Tag_cite] "cite", END,
[Tag_code] "code", END,
diff --git a/sys/src/cmd/mothra/rdhtml.c b/sys/src/cmd/mothra/rdhtml.c
index 6605a27f5..121a25589 100644
--- a/sys/src/cmd/mothra/rdhtml.c
+++ b/sys/src/cmd/mothra/rdhtml.c
@@ -886,6 +886,7 @@ void plrdhtml(char *name, int fd, Www *dst){
break;
case Tag_form:
case Tag_input:
+ case Tag_button:
case Tag_select:
case Tag_option:
case Tag_textarea: