зеркало из https://github.com/mozilla/pjs.git
Prevent content inside IFRAME from evaluating ( specifically SCRIPT ). b=149887, r=heikki, sr=jst
This commit is contained in:
Родитель
ef56c1a5ba
Коммит
d0b9b4756c
|
@ -783,9 +783,9 @@ nsresult CNavDTD::HandleToken(CToken* aToken,nsIParser* aParser){
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// If you're here then we have seen a /noscript.
|
// If you're here then we have either seen a /noscript,
|
||||||
// After handling the text token intentionally
|
// or /noframes, or /iframe. After handling the text token
|
||||||
// fall thro' such that /noscript gets handled.
|
// intentionally fall thro' to handle the current end token.
|
||||||
CTextToken theTextToken(mScratch);
|
CTextToken theTextToken(mScratch);
|
||||||
result=HandleStartToken(&theTextToken);
|
result=HandleStartToken(&theTextToken);
|
||||||
|
|
||||||
|
@ -840,6 +840,7 @@ nsresult CNavDTD::HandleToken(CToken* aToken,nsIParser* aParser){
|
||||||
|
|
||||||
switch(theTag) {
|
switch(theTag) {
|
||||||
case eHTMLTag_html:
|
case eHTMLTag_html:
|
||||||
|
case eHTMLTag_iframe:
|
||||||
case eHTMLTag_noframes:
|
case eHTMLTag_noframes:
|
||||||
case eHTMLTag_noscript:
|
case eHTMLTag_noscript:
|
||||||
case eHTMLTag_script:
|
case eHTMLTag_script:
|
||||||
|
|
|
@ -98,7 +98,9 @@ TagList gFontKids={3,{eHTMLTag_legend,eHTMLTag_table,eHTMLTag_text}}; // Added
|
||||||
TagList gFormKids={1,{eHTMLTag_keygen}};
|
TagList gFormKids={1,{eHTMLTag_keygen}};
|
||||||
TagList gFramesetKids={3,{eHTMLTag_frame,eHTMLTag_frameset,eHTMLTag_noframes}};
|
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 gHeadKids={8,{eHTMLTag_base,eHTMLTag_bgsound,eHTMLTag_link,eHTMLTag_meta,eHTMLTag_script,eHTMLTag_style,eHTMLTag_title,eHTMLTag_noembed}};
|
||||||
|
|
||||||
TagList gLabelKids={1,{eHTMLTag_span}};
|
TagList gLabelKids={1,{eHTMLTag_span}};
|
||||||
|
|
|
@ -783,9 +783,9 @@ nsresult CNavDTD::HandleToken(CToken* aToken,nsIParser* aParser){
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// If you're here then we have seen a /noscript.
|
// If you're here then we have either seen a /noscript,
|
||||||
// After handling the text token intentionally
|
// or /noframes, or /iframe. After handling the text token
|
||||||
// fall thro' such that /noscript gets handled.
|
// intentionally fall thro' to handle the current end token.
|
||||||
CTextToken theTextToken(mScratch);
|
CTextToken theTextToken(mScratch);
|
||||||
result=HandleStartToken(&theTextToken);
|
result=HandleStartToken(&theTextToken);
|
||||||
|
|
||||||
|
@ -840,6 +840,7 @@ nsresult CNavDTD::HandleToken(CToken* aToken,nsIParser* aParser){
|
||||||
|
|
||||||
switch(theTag) {
|
switch(theTag) {
|
||||||
case eHTMLTag_html:
|
case eHTMLTag_html:
|
||||||
|
case eHTMLTag_iframe:
|
||||||
case eHTMLTag_noframes:
|
case eHTMLTag_noframes:
|
||||||
case eHTMLTag_noscript:
|
case eHTMLTag_noscript:
|
||||||
case eHTMLTag_script:
|
case eHTMLTag_script:
|
||||||
|
|
|
@ -98,7 +98,9 @@ TagList gFontKids={3,{eHTMLTag_legend,eHTMLTag_table,eHTMLTag_text}}; // Added
|
||||||
TagList gFormKids={1,{eHTMLTag_keygen}};
|
TagList gFormKids={1,{eHTMLTag_keygen}};
|
||||||
TagList gFramesetKids={3,{eHTMLTag_frame,eHTMLTag_frameset,eHTMLTag_noframes}};
|
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 gHeadKids={8,{eHTMLTag_base,eHTMLTag_bgsound,eHTMLTag_link,eHTMLTag_meta,eHTMLTag_script,eHTMLTag_style,eHTMLTag_title,eHTMLTag_noembed}};
|
||||||
|
|
||||||
TagList gLabelKids={1,{eHTMLTag_span}};
|
TagList gLabelKids={1,{eHTMLTag_span}};
|
||||||
|
|
Загрузка…
Ссылка в новой задаче