mothra: more tags
parent
ff0dc1668f
commit
b4fb5e2384
|
@ -178,14 +178,16 @@ void rdform(Hglob *g){
|
|||
f->type=TYPEIN;
|
||||
if(cistrcmp(s, "password")==0)
|
||||
f->type=PASSWD;
|
||||
|
||||
s=f->name;
|
||||
if(s && cistrcmp(s, "isindex")==0)
|
||||
f->type=INDEX;
|
||||
|
||||
/*
|
||||
* If there's exactly one attribute, use its value as the name,
|
||||
* regardless of the attribute name. This makes
|
||||
* http://linus.att.com/ias/puborder.html work.
|
||||
*/
|
||||
s=f->name;
|
||||
if(s && cistrcmp(s, "isindex")==0)
|
||||
f->type=INDEX;
|
||||
if(s==0){
|
||||
if(g->attr[0].name && g->attr[1].name==0)
|
||||
f->name=strdup(g->attr[0].value);
|
||||
|
|
|
@ -119,8 +119,13 @@ enum{
|
|||
*/
|
||||
enum{
|
||||
Tag_comment,
|
||||
|
||||
Tag_a,
|
||||
Tag_abbr,
|
||||
Tag_acronym,
|
||||
Tag_address,
|
||||
Tag_applet,
|
||||
Tag_audio,
|
||||
Tag_b,
|
||||
Tag_base,
|
||||
Tag_blockquot,
|
||||
|
@ -136,8 +141,10 @@ enum{
|
|||
Tag_dl,
|
||||
Tag_dt,
|
||||
Tag_em,
|
||||
Tag_embed,
|
||||
Tag_font,
|
||||
Tag_form,
|
||||
Tag_frame, /* rm 5.8.97 */
|
||||
Tag_h1,
|
||||
Tag_h2,
|
||||
Tag_h3,
|
||||
|
@ -148,6 +155,7 @@ enum{
|
|||
Tag_hr,
|
||||
Tag_html,
|
||||
Tag_i,
|
||||
Tag_iframe,
|
||||
Tag_img,
|
||||
Tag_input,
|
||||
Tag_isindex,
|
||||
|
@ -159,31 +167,31 @@ enum{
|
|||
Tag_menu,
|
||||
Tag_meta,
|
||||
Tag_nextid,
|
||||
Tag_object,
|
||||
Tag_ol,
|
||||
Tag_option,
|
||||
Tag_p,
|
||||
Tag_plaintext,
|
||||
Tag_pre,
|
||||
Tag_samp,
|
||||
Tag_script,
|
||||
Tag_select,
|
||||
Tag_strong,
|
||||
Tag_style,
|
||||
Tag_source,
|
||||
Tag_table, /* rm 3.8.00 */
|
||||
Tag_td,
|
||||
Tag_textarea,
|
||||
Tag_title,
|
||||
Tag_tr,
|
||||
Tag_tt,
|
||||
Tag_u,
|
||||
Tag_ul,
|
||||
Tag_var,
|
||||
Tag_xmp,
|
||||
Tag_frame, /* rm 5.8.97 */
|
||||
Tag_table, /* rm 3.8.00 */
|
||||
Tag_td,
|
||||
Tag_tr,
|
||||
Tag_video,
|
||||
Tag_object,
|
||||
Tag_script,
|
||||
Tag_style,
|
||||
Tag_end, /* also used to indicate unrecognized start tag */
|
||||
Tag_xmp,
|
||||
|
||||
Tag_end, /* also used to indicate unrecognized start tag */
|
||||
Tag_text,
|
||||
};
|
||||
enum{
|
||||
|
|
|
@ -6,9 +6,12 @@
|
|||
#include "mothra.h"
|
||||
#include "html.h"
|
||||
Tag tag[]={
|
||||
[Tag_comment] "!--", NOEND,
|
||||
[Tag_a] "a", END,
|
||||
[Tag_abbr] "abbr", END,
|
||||
[Tag_acronym] "acronym", END,
|
||||
[Tag_address] "address", END,
|
||||
[Tag_applet] "applet", NOEND,
|
||||
[Tag_audio] "audio", NOEND,
|
||||
[Tag_b] "b", END,
|
||||
[Tag_base] "base", NOEND,
|
||||
[Tag_blockquot] "blockquote", END,
|
||||
|
@ -18,14 +21,18 @@ Tag tag[]={
|
|||
[Tag_center] "center", END,
|
||||
[Tag_cite] "cite", END,
|
||||
[Tag_code] "code", END,
|
||||
[Tag_comment] "!--", NOEND,
|
||||
[Tag_dd] "dd", NOEND, /* OPTEND */
|
||||
[Tag_dfn] "dfn", END,
|
||||
[Tag_dir] "dir", END,
|
||||
[Tag_dl] "dl", END,
|
||||
[Tag_dt] "dt", NOEND, /* OPTEND */
|
||||
[Tag_em] "em", END,
|
||||
[Tag_embed] "embed", NOEND,
|
||||
[Tag_end] 0, ERR,
|
||||
[Tag_font] "font", END,
|
||||
[Tag_form] "form", END,
|
||||
[Tag_frame] "frame", NOEND,
|
||||
[Tag_h1] "h1", END,
|
||||
[Tag_h2] "h2", END,
|
||||
[Tag_h3] "h3", END,
|
||||
|
@ -36,8 +43,9 @@ Tag tag[]={
|
|||
[Tag_hr] "hr", NOEND,
|
||||
[Tag_html] "html", END, /* OPTEND */
|
||||
[Tag_i] "i", END,
|
||||
[Tag_input] "input", NOEND,
|
||||
[Tag_iframe] "iframe", NOEND,
|
||||
[Tag_img] "img", NOEND,
|
||||
[Tag_input] "input", NOEND,
|
||||
[Tag_isindex] "isindex", NOEND,
|
||||
[Tag_kbd] "kbd", END,
|
||||
[Tag_key] "key", END,
|
||||
|
@ -47,20 +55,20 @@ Tag tag[]={
|
|||
[Tag_menu] "menu", END,
|
||||
[Tag_meta] "meta", NOEND,
|
||||
[Tag_nextid] "nextid", NOEND,
|
||||
[Tag_object] "object", END,
|
||||
[Tag_ol] "ol", END,
|
||||
[Tag_option] "option", NOEND, /* OPTEND */
|
||||
[Tag_p] "p", NOEND, /* OPTEND */
|
||||
[Tag_plaintext] "plaintext", NOEND,
|
||||
[Tag_pre] "pre", END,
|
||||
[Tag_samp] "samp", END,
|
||||
[Tag_video] "video", NOEND,
|
||||
[Tag_object] "object", END,
|
||||
[Tag_script] "script", END,
|
||||
[Tag_style] "style", END,
|
||||
[Tag_select] "select", END,
|
||||
[Tag_strong] "strong", END,
|
||||
[Tag_table] "table", END,
|
||||
[Tag_td] "td", END,
|
||||
[Tag_style] "style", END,
|
||||
[Tag_source] "source", NOEND,
|
||||
[Tag_table] "table", END,
|
||||
[Tag_td] "td", END,
|
||||
[Tag_textarea] "textarea", END,
|
||||
[Tag_title] "title", END,
|
||||
[Tag_tr] "tr", END,
|
||||
|
@ -68,7 +76,6 @@ Tag tag[]={
|
|||
[Tag_u] "u", END,
|
||||
[Tag_ul] "ul", END,
|
||||
[Tag_var] "var", END,
|
||||
[Tag_video] "video", NOEND,
|
||||
[Tag_xmp] "xmp", END,
|
||||
[Tag_frame] "frame", NOEND,
|
||||
[Tag_end] 0, ERR,
|
||||
};
|
||||
|
|
|
@ -729,8 +729,12 @@ void plrdhtml(char *name, int fd, Www *dst){
|
|||
g.linebrk=1;
|
||||
g.spacc=0;
|
||||
break;
|
||||
case Tag_source:
|
||||
case Tag_video:
|
||||
case Tag_audio:
|
||||
case Tag_embed:
|
||||
case Tag_frame:
|
||||
case Tag_iframe:
|
||||
if(str=pl_getattr(g.attr, "src"))
|
||||
strncpy(g.state->link, str, sizeof(g.state->link));
|
||||
if(str=pl_getattr(g.attr, "name"))
|
||||
|
@ -780,6 +784,7 @@ void plrdhtml(char *name, int fd, Www *dst){
|
|||
/* more to come */
|
||||
break;
|
||||
case Tag_cite:
|
||||
case Tag_acronym:
|
||||
g.state->font=ITALIC;
|
||||
g.state->size=NORMAL;
|
||||
break;
|
||||
|
@ -795,6 +800,7 @@ void plrdhtml(char *name, int fd, Www *dst){
|
|||
break;
|
||||
case Tag_dfn:
|
||||
htmlerror(g.name, g.lineno, "<dfn> deprecated");
|
||||
case Tag_abbr:
|
||||
g.state->font=BOLD;
|
||||
g.state->size=NORMAL;
|
||||
break;
|
||||
|
@ -940,6 +946,7 @@ void plrdhtml(char *name, int fd, Www *dst){
|
|||
break;
|
||||
case Tag_script:
|
||||
case Tag_object:
|
||||
case Tag_applet:
|
||||
case Tag_style:
|
||||
/*
|
||||
* ignore the content of these tags, eat tokens until we
|
||||
|
|
Loading…
Reference in New Issue