allow view-source on XML

git-svn-id: svn://10.0.0.236/trunk@14583 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rickg%netscape.com
1998-11-13 04:36:46 +00:00
parent e8b6cc2769
commit 11309dbf4e
14 changed files with 82 additions and 48 deletions

View File

@@ -57,6 +57,7 @@ static NS_DEFINE_IID(kClassIID, NS_WELLFORMED_DTD_IID);
//static const char* kNullToken = "Error: Null token given";
//static const char* kInvalidTagStackPos = "Error: invalid tag stack position";
static const char* kXMLTextContentType = "text/xml";
static const char* kViewSourceCommand= "view-source";
static nsAutoString gEmpty;
static CTokenRecycler gTokenRecycler;
@@ -168,7 +169,10 @@ nsresult CWellFormedDTD::CreateNewInstance(nsIDTD** aInstancePtrResult){
* @return TRUE if this DTD can satisfy the request; FALSE otherwise.
*/
PRBool CWellFormedDTD::CanParse(nsString& aContentType, nsString& aCommand, PRInt32 aVersion){
PRBool result=aContentType.Equals(kXMLTextContentType);
PRBool result=PR_FALSE;
if(!aCommand.Equals(kViewSourceCommand)) {
result=aContentType.Equals(kXMLTextContentType);
}
return result;
}