зеркало из https://github.com/mozilla/pjs.git
Fix for 30486 [ PDT+] - Guessing that builds team would migrate these changes to the BRANCH.
Triming off <! and > from the DOCTYPE string. r=akkana a=rickg
This commit is contained in:
Родитель
72a8ee9dda
Коммит
e5f7014b0e
|
@ -1933,7 +1933,13 @@ nsresult CNavDTD::HandleDocTypeDeclToken(CToken* aToken){
|
||||||
|
|
||||||
nsString& docTypeStr=aToken->GetStringValueXXX();
|
nsString& docTypeStr=aToken->GetStringValueXXX();
|
||||||
mLineNumber += (docTypeStr).CountChar(kNewLine);
|
mLineNumber += (docTypeStr).CountChar(kNewLine);
|
||||||
docTypeStr.Trim("<!>");
|
|
||||||
|
PRInt32 len=docTypeStr.Length();
|
||||||
|
PRInt32 pos=docTypeStr.RFindChar(kGreaterThan);
|
||||||
|
if(pos>-1) {
|
||||||
|
docTypeStr.Cut(pos,len-pos);// First remove '>' from the end.
|
||||||
|
}
|
||||||
|
docTypeStr.Cut(0,2); // Now remove "<!" from the begining
|
||||||
|
|
||||||
nsCParserNode* theNode=CreateNode();
|
nsCParserNode* theNode=CreateNode();
|
||||||
if(theNode) {
|
if(theNode) {
|
||||||
|
|
|
@ -1933,7 +1933,13 @@ nsresult CNavDTD::HandleDocTypeDeclToken(CToken* aToken){
|
||||||
|
|
||||||
nsString& docTypeStr=aToken->GetStringValueXXX();
|
nsString& docTypeStr=aToken->GetStringValueXXX();
|
||||||
mLineNumber += (docTypeStr).CountChar(kNewLine);
|
mLineNumber += (docTypeStr).CountChar(kNewLine);
|
||||||
docTypeStr.Trim("<!>");
|
|
||||||
|
PRInt32 len=docTypeStr.Length();
|
||||||
|
PRInt32 pos=docTypeStr.RFindChar(kGreaterThan);
|
||||||
|
if(pos>-1) {
|
||||||
|
docTypeStr.Cut(pos,len-pos);// First remove '>' from the end.
|
||||||
|
}
|
||||||
|
docTypeStr.Cut(0,2); // Now remove "<!" from the begining
|
||||||
|
|
||||||
nsCParserNode* theNode=CreateNode();
|
nsCParserNode* theNode=CreateNode();
|
||||||
if(theNode) {
|
if(theNode) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче