mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-27 18:01:44 -10:00
another fix for entities
This commit is contained in:
1 parent
ccd3de0272
commit
01e7e472eb
6 files changed
+104
-70
No files matched your search
@@ -532,7 +532,7 @@ nsresult nsHTMLTokenizer::ConsumeEntity(PRUnichar aChar,CToken*& aToken,nsScanne
|
||||
}
|
||||
else if(kHashsign==theChar) {
|
||||
aToken = theRecycler->CreateTokenOfType(eToken_entity,eHTMLTag_entity);
|
||||
result=aToken->Consume(0,aScanner);
|
||||
result=aToken->Consume(theChar,aScanner);
|
||||
}
|
||||
else {
|
||||
//oops, we're actually looking at plain text...
|
||||
@@ -544,7 +544,7 @@ nsresult nsHTMLTokenizer::ConsumeEntity(PRUnichar aChar,CToken*& aToken,nsScanne
|
||||
char cbuf[30];
|
||||
nsString& theStr=aToken->GetStringValueXXX();
|
||||
theStr.ToCString(cbuf, sizeof(cbuf)-1);
|
||||
if(-1==NS_EntityToUnicode(cbuf)){
|
||||
if((kHashsign!=theChar) && (-1==NS_EntityToUnicode(cbuf))){
|
||||
//if you're here we have a bogus entity.
|
||||
//convert it into a text token.
|
||||
nsAutoString temp("&");
|
||||
|
||||
Reference in new issue
Block a user