ref: cec4e59dee19b398d95bc6e0d8ece2acdd0c8d84
parent: a8fdcbf3a2e100f1e8f2ee30bead4d0ed0172b41
author: cinap_lenrek <cinap_lenrek@centraldogma>
date: Fri Sep 23 12:12:27 EDT 2011
mothra: button tag, email input type
--- a/sys/src/cmd/mothra/forms.c
+++ b/sys/src/cmd/mothra/forms.c
@@ -118,6 +118,7 @@
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 @@
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;
--- a/sys/src/cmd/mothra/html.h
+++ b/sys/src/cmd/mothra/html.h
@@ -127,6 +127,7 @@
Tag_blockquot,
Tag_body,
Tag_br,
+ Tag_button,
Tag_center,
Tag_cite,
Tag_code,
--- a/sys/src/cmd/mothra/html.syntax.c
+++ b/sys/src/cmd/mothra/html.syntax.c
@@ -14,6 +14,7 @@
[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,
--- a/sys/src/cmd/mothra/rdhtml.c
+++ b/sys/src/cmd/mothra/rdhtml.c
@@ -886,6 +886,7 @@
break;
case Tag_form:
case Tag_input:
+ case Tag_button:
case Tag_select:
case Tag_option:
case Tag_textarea: