mothra: <input type=""> default to text if no/invalid value
This commit is contained in:
parent
001ce57253
commit
88f938cbe7
1 changed files with 2 additions and 6 deletions
|
@ -169,8 +169,6 @@ void rdform(Hglob *g){
|
||||||
f->name=strdup("no-name");
|
f->name=strdup("no-name");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(cistrcmp(s, "search")==0)
|
|
||||||
f->type=TYPEIN;
|
|
||||||
else if(cistrcmp(s, "checkbox")==0)
|
else if(cistrcmp(s, "checkbox")==0)
|
||||||
f->type=CHECK;
|
f->type=CHECK;
|
||||||
else if(cistrcmp(s, "radio")==0)
|
else if(cistrcmp(s, "radio")==0)
|
||||||
|
@ -188,10 +186,8 @@ void rdform(Hglob *g){
|
||||||
f->type=RESET;
|
f->type=RESET;
|
||||||
else if(cistrcmp(s, "hidden")==0)
|
else if(cistrcmp(s, "hidden")==0)
|
||||||
f->type=HIDDEN;
|
f->type=HIDDEN;
|
||||||
else{
|
else
|
||||||
htmlerror(g->name, g->lineno, "bad field type %s, ignored", s);
|
f->type=TYPEIN;
|
||||||
break;
|
|
||||||
}
|
|
||||||
if((f->type==CHECK || f->type==RADIO) && !pl_hasattr(g->attr, "value")){
|
if((f->type==CHECK || f->type==RADIO) && !pl_hasattr(g->attr, "value")){
|
||||||
free(f->value);
|
free(f->value);
|
||||||
f->value=strdup("on");
|
f->value=strdup("on");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue