allow view-source on XML

This commit is contained in:
rickg@netscape.com
1998-11-13 04:36:46 +00:00
parent 201ec3d3be
commit 153b1c19c6
14 changed files with 82 additions and 48 deletions
+5 -1
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;
}