- 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:
nisheeth%netscape.com
1999-04-08 09:21:16 +00:00
parent 82ff5ae768
commit 4cb9ed22c6
6 changed files with 34 additions and 20 deletions

View File

@@ -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) {