- Enable expat by default. If you run into problems, you can disable expat at run-time by setting NOEXPAT=1 in your environment on Windows and UNIX.
On Mac, create a file called NOEXPAT in the directory from which you run the browser. - Changed nsExpatTokenizer so that it stops parsing buffers once it sees an XML well-formedness error. git-svn-id: svn://10.0.0.236/trunk@26804 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -330,18 +330,18 @@ nsITokenRecycler* CWellFormedDTD::GetTokenRecycler(void){
|
||||
*/
|
||||
nsITokenizer* CWellFormedDTD::GetTokenizer(void) {
|
||||
if(!mTokenizer) {
|
||||
PRBool theExpatState=PR_FALSE;
|
||||
PRBool theExpatState=PR_TRUE;
|
||||
#ifndef XP_MAC
|
||||
char* theEnvString = PR_GetEnv("EXPAT");
|
||||
char* theEnvString = PR_GetEnv("NOEXPAT");
|
||||
if(theEnvString){
|
||||
if(('1'==theEnvString[0]) || ('Y'==theEnvString[0]) || ('y'==theEnvString[0])) {
|
||||
theExpatState=PR_TRUE; //this indicates that the EXPAT flag was found in the environment.
|
||||
theExpatState=PR_FALSE; //this indicates that the EXPAT flag was found in the environment.
|
||||
}
|
||||
}
|
||||
#else
|
||||
// Check for the existence of a file called EXPAT in the current directory
|
||||
nsSpecialSystemDirectory expatFile(nsSpecialSystemDirectory::OS_CurrentProcessDirectory);
|
||||
expatFile += "EXPAT";
|
||||
expatFile += "NOEXPAT";
|
||||
theExpatState = expatFile.Exists();
|
||||
#endif
|
||||
if(theExpatState) {
|
||||
|
||||
Reference in New Issue
Block a user