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
@@ -49,6 +49,7 @@ static const char* kNullToken = "Error: Null token given";
static const char* kInvalidTagStackPos = "Error: invalid tag stack position";
static const char* kHTMLTextContentType = "text/html";
static char* kVerificationDir = "c:/temp";
static const char* kViewSourceCommand= "view-source";
static nsAutoString gEmpty;
@@ -324,7 +325,10 @@ PRBool CNavDTD::Verify(nsString& aURLRef){
* @return TRUE if this DTD can satisfy the request; FALSE otherwise.
*/
PRBool CNavDTD::CanParse(nsString& aContentType, nsString& aCommand, PRInt32 aVersion){
PRBool result=aContentType.Equals(kHTMLTextContentType);
PRBool result=PR_FALSE;
if(!aCommand.Equals(kViewSourceCommand)) {
result=aContentType.Equals(kHTMLTextContentType);
}
return result;
}