mothra: button tag, email input type

This commit is contained in:
cinap_lenrek 2011-09-23 16:12:27 +02:00
parent a8fdcbf3a2
commit cec4e59dee
4 changed files with 7 additions and 1 deletions

View file

@ -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;

View file

@ -127,6 +127,7 @@ enum{
Tag_blockquot,
Tag_body,
Tag_br,
Tag_button,
Tag_center,
Tag_cite,
Tag_code,

View file

@ -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,

View file

@ -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: