diff --git a/libhtmlw/HTML.h b/libhtmlw/HTML.h index 9894311..6454804 100644 --- a/libhtmlw/HTML.h +++ b/libhtmlw/HTML.h @@ -440,6 +440,8 @@ struct delay_rec { #define M_MAP 58 /* swp - client side ismap */ #define M_AREA 59 /* swp - client side ismap */ #define M_CENTER 60 +#define M_SCRIPT 61 +#define M_STYLE 62 /* syntax of Mark types */ #define MT_TITLE "title" @@ -502,6 +504,10 @@ struct delay_rec { #define MT_AREA "area" /* swp - client side ismap */ #define MT_CENTER "center" +/* tags from THE FUTURE! we will ignore their contents. */ +#define MT_SCRIPT "script" +#define MT_STYLE "style" + /* anchor tags */ #define AT_NAME "name" #define AT_HREF "href" diff --git a/libhtmlw/HTMLformat.c b/libhtmlw/HTMLformat.c index eda0370..3f395f6 100644 --- a/libhtmlw/HTMLformat.c +++ b/libhtmlw/HTMLformat.c @@ -3505,7 +3505,7 @@ int *x, *y; * Let OPTION through so we can hit the OPTIONs. * Let TEXTAREA through so we can hit the TEXTAREAs. */ - if ((Ignore)&&(!InDocHead)&&(type != M_TITLE)&&(type != M_NONE)&& + if ((Ignore)&&(!InDocHead)&&(type != M_TITLE)&&(type != M_NONE)&&(type != M_COMMENT)&& (type != M_SELECT)&&(type != M_OPTION)&& (type != M_TEXTAREA)&&(type != M_DOC_HEAD)) { @@ -4832,6 +4832,9 @@ int *x, *y; TablePlace(hw, mptr, x, y, Width); } break; + case M_COMMENT: + Ignore = !mark->is_end; + break; default: break; } diff --git a/libhtmlw/HTMLparse.c b/libhtmlw/HTMLparse.c index 9acceb3..b780551 100644 --- a/libhtmlw/HTMLparse.c +++ b/libhtmlw/HTMLparse.c @@ -1407,6 +1407,14 @@ ParseMarkType(str) { type = M_CENTER; } + else if (caseless_equal(str, MT_SCRIPT)) + { + type = M_COMMENT; + } + else if (caseless_equal(str, MT_STYLE)) + { + type = M_COMMENT; + } else { #ifndef DISABLE_TRACE