a tiny update to improve XML support
git-svn-id: svn://10.0.0.236/trunk@14303 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -48,6 +48,7 @@ static NS_DEFINE_IID(kClassIID, NS_INAVHTML_DTD_IID);
|
||||
static const char* kNullToken = "Error: Null token given";
|
||||
static const char* kInvalidTagStackPos = "Error: invalid tag stack position";
|
||||
static const char* kHTMLTextContentType = "text/html";
|
||||
static const char* kXMLTextContentType = "text/xml";
|
||||
static char* kVerificationDir = "c:/temp";
|
||||
|
||||
static nsAutoString gEmpty;
|
||||
@@ -442,6 +443,8 @@ PRBool CNavDTD::Verify(nsString& aURLRef){
|
||||
*/
|
||||
PRBool CNavDTD::CanParse(nsString& aContentType, PRInt32 aVersion){
|
||||
PRBool result=aContentType.Equals(kHTMLTextContentType);
|
||||
if(!result)
|
||||
result=aContentType.Equals(kXMLTextContentType);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -455,6 +458,8 @@ eAutoDetectResult CNavDTD::AutoDetectContentType(nsString& aBuffer,nsString& aTy
|
||||
eAutoDetectResult result=eUnknownDetect;
|
||||
if(PR_TRUE==aType.Equals(kHTMLTextContentType))
|
||||
result=eValidDetect;
|
||||
if(PR_TRUE==aType.Equals(kXMLTextContentType))
|
||||
result=eValidDetect;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user