Prevent content inside IFRAME from evaluating ( specifically SCRIPT ). b=149887, r=heikki, sr=jst

This commit is contained in:
harishd%netscape.com 2002-12-03 22:31:38 +00:00
parent a943c7119a
commit 6f9d106c0c
4 changed files with 14 additions and 8 deletions

View File

@ -783,9 +783,9 @@ nsresult CNavDTD::HandleToken(CToken* aToken,nsIParser* aParser){
return result;
}
else {
// If you're here then we have seen a /noscript.
// After handling the text token intentionally
// fall thro' such that /noscript gets handled.
// If you're here then we have either seen a /noscript,
// or /noframes, or /iframe. After handling the text token
// intentionally fall thro' to handle the current end token.
CTextToken theTextToken(mScratch);
result=HandleStartToken(&theTextToken);
@ -840,6 +840,7 @@ nsresult CNavDTD::HandleToken(CToken* aToken,nsIParser* aParser){
switch(theTag) {
case eHTMLTag_html:
case eHTMLTag_iframe:
case eHTMLTag_noframes:
case eHTMLTag_noscript:
case eHTMLTag_script:

View File

@ -98,7 +98,9 @@ TagList gFontKids={3,{eHTMLTag_legend,eHTMLTag_table,eHTMLTag_text}}; // Added
TagList gFormKids={1,{eHTMLTag_keygen}};
TagList gFramesetKids={3,{eHTMLTag_frame,eHTMLTag_frameset,eHTMLTag_noframes}};
TagList gHtmlKids={9,{eHTMLTag_body,eHTMLTag_frameset,eHTMLTag_head,eHTMLTag_map,eHTMLTag_noscript,eHTMLTag_noframes,eHTMLTag_script,eHTMLTag_newline,eHTMLTag_whitespace}};
TagList gHtmlKids={10,{eHTMLTag_body,eHTMLTag_frameset,eHTMLTag_head, eHTMLTag_map,
eHTMLTag_noscript,eHTMLTag_noframes, eHTMLTag_script,eHTMLTag_newline,
eHTMLTag_whitespace, eHTMLTag_iframe}}; // Added iframe to fix bug 149887
TagList gHeadKids={8,{eHTMLTag_base,eHTMLTag_bgsound,eHTMLTag_link,eHTMLTag_meta,eHTMLTag_script,eHTMLTag_style,eHTMLTag_title,eHTMLTag_noembed}};
TagList gLabelKids={1,{eHTMLTag_span}};

View File

@ -783,9 +783,9 @@ nsresult CNavDTD::HandleToken(CToken* aToken,nsIParser* aParser){
return result;
}
else {
// If you're here then we have seen a /noscript.
// After handling the text token intentionally
// fall thro' such that /noscript gets handled.
// If you're here then we have either seen a /noscript,
// or /noframes, or /iframe. After handling the text token
// intentionally fall thro' to handle the current end token.
CTextToken theTextToken(mScratch);
result=HandleStartToken(&theTextToken);
@ -840,6 +840,7 @@ nsresult CNavDTD::HandleToken(CToken* aToken,nsIParser* aParser){
switch(theTag) {
case eHTMLTag_html:
case eHTMLTag_iframe:
case eHTMLTag_noframes:
case eHTMLTag_noscript:
case eHTMLTag_script:

View File

@ -98,7 +98,9 @@ TagList gFontKids={3,{eHTMLTag_legend,eHTMLTag_table,eHTMLTag_text}}; // Added
TagList gFormKids={1,{eHTMLTag_keygen}};
TagList gFramesetKids={3,{eHTMLTag_frame,eHTMLTag_frameset,eHTMLTag_noframes}};
TagList gHtmlKids={9,{eHTMLTag_body,eHTMLTag_frameset,eHTMLTag_head,eHTMLTag_map,eHTMLTag_noscript,eHTMLTag_noframes,eHTMLTag_script,eHTMLTag_newline,eHTMLTag_whitespace}};
TagList gHtmlKids={10,{eHTMLTag_body,eHTMLTag_frameset,eHTMLTag_head, eHTMLTag_map,
eHTMLTag_noscript,eHTMLTag_noframes, eHTMLTag_script,eHTMLTag_newline,
eHTMLTag_whitespace, eHTMLTag_iframe}}; // Added iframe to fix bug 149887
TagList gHeadKids={8,{eHTMLTag_base,eHTMLTag_bgsound,eHTMLTag_link,eHTMLTag_meta,eHTMLTag_script,eHTMLTag_style,eHTMLTag_title,eHTMLTag_noembed}};
TagList gLabelKids={1,{eHTMLTag_span}};