Ignore <script> and <style> tags.
This commit is contained in:
parent
d3559c33f6
commit
5f74c675be
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Reference in New Issue