checkin to fix bugs per hofmann

git-svn-id: svn://10.0.0.236/trunk@32387 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rickg%netscape.com
1999-05-20 07:36:54 +00:00
parent 7130ae80a6
commit ec1b421792
8 changed files with 22 additions and 14 deletions

View File

@@ -455,11 +455,14 @@ nsresult nsHTMLTokenizer::ConsumeStartTag(PRUnichar aChar,CToken*& aToken,nsScan
In the case that we just read a <SCRIPT> or <STYLE> tags, we should go and
consume all the content itself.
*/
if(NS_SUCCEEDED(result) && (eHTMLTag_script==theTag)) {
nsAutoString endTag("</script>");
if(NS_SUCCEEDED(result))
if((eHTMLTag_style==theTag) || (eHTMLTag_script==theTag)) {
nsAutoString endTag("</");
endTag.Append(NS_EnumToTag(theTag));
endTag.Append(">");
CTokenRecycler* theRecycler=(CTokenRecycler*)GetTokenRecycler();
CToken* textToken=theRecycler->CreateTokenOfType(eToken_text,theTag,endTag);
result=((CTextToken*)textToken)->ConsumeUntil(0,aScanner,endTag); //tell new token to finish consuming text...
result=((CTextToken*)textToken)->ConsumeUntil(0,PRBool(eHTMLTag_style==theTag),aScanner,endTag); //tell new token to finish consuming text...
AddToken(textToken,result,mTokenDeque,theRecycler);
CToken* endToken=theRecycler->CreateTokenOfType(eToken_end,theTag);
AddToken(endToken,result,mTokenDeque,theRecycler);