diff --git a/mailnews/base/util/nsMsgUtils.cpp b/mailnews/base/util/nsMsgUtils.cpp index ffea2de2bc4..95aff30e7f0 100644 --- a/mailnews/base/util/nsMsgUtils.cpp +++ b/mailnews/base/util/nsMsgUtils.cpp @@ -621,3 +621,21 @@ nsresult CreateServicesForPasswordManager() } return NS_OK; } + +nsresult IsRFC822HeaderFieldName(const char *aHdr, PRBool *aResult) +{ + NS_ENSURE_ARG_POINTER(aHdr); + NS_ENSURE_ARG_POINTER(aResult); + PRUint32 length = strlen(aHdr); + for(PRUint32 i=0; i '~') + { + *aResult = PR_FALSE; + return NS_OK; + } + } + *aResult = PR_TRUE; + return NS_OK; +} diff --git a/mailnews/base/util/nsMsgUtils.h b/mailnews/base/util/nsMsgUtils.h index c777ae51314..66f6e661cd1 100644 --- a/mailnews/base/util/nsMsgUtils.h +++ b/mailnews/base/util/nsMsgUtils.h @@ -85,5 +85,7 @@ NS_MSG_BASE PRBool IsAFromSpaceLine(char *start, const char *end); NS_MSG_BASE nsresult CreateServicesForPasswordManager(); +NS_MSG_BASE nsresult IsRFC822HeaderFieldName(const char *aHdr, PRBool *aResult); + #endif