changed to preprocessor for code generation for tag & entity tables
cleanup tag and entity lookup apis git-svn-id: svn://10.0.0.236/trunk@39926 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -468,7 +468,7 @@ nsresult nsHTMLTokenizer::ConsumeStartTag(PRUnichar aChar,CToken*& aToken,nsScan
|
||||
*/
|
||||
if(NS_SUCCEEDED(result))
|
||||
if((eHTMLTag_style==theTag) || (eHTMLTag_script==theTag)) {
|
||||
nsAutoString endTag(NS_EnumToTag(theTag));
|
||||
nsAutoString endTag(nsHTMLTags::GetStringValue(theTag));
|
||||
endTag.Insert("</",0,2);
|
||||
CToken* textToken=theRecycler->CreateTokenOfType(eToken_text,theTag,endTag);
|
||||
result=((CTextToken*)textToken)->ConsumeUntil(0,PR_TRUE,aScanner,endTag); //tell new token to finish consuming text...
|
||||
@@ -545,10 +545,8 @@ nsresult nsHTMLTokenizer::ConsumeEntity(PRUnichar aChar,CToken*& aToken,nsScanne
|
||||
return ConsumeText(temp,aToken,aScanner);
|
||||
}//if
|
||||
if(aToken){
|
||||
char cbuf[30];
|
||||
nsString& theStr=aToken->GetStringValueXXX();
|
||||
theStr.ToCString(cbuf, sizeof(cbuf)-1);
|
||||
if((kHashsign!=theChar) && (-1==NS_EntityToUnicode(cbuf))){
|
||||
if((kHashsign!=theChar) && (-1==nsHTMLEntities::EntityToUnicode(theStr))){
|
||||
//if you're here we have a bogus entity.
|
||||
//convert it into a text token.
|
||||
nsAutoString temp("&");
|
||||
|
||||
Reference in New Issue
Block a user