if (NS_SUCCEEDED(rv) && messageService) { messageService->DisplayMessage(url, mWebShell, nsnull, nsnull); ReleaseMessageServiceFromURI(url, messageService); }  else { nsString urlStr(url); mWebShell->LoadURL(urlStr.GetUnicode()); } } return NS_OK;
SetDisplayCharset("UTF-8");  char *unescapedUrl = PL_strdup(aURL); if (!unescapedUrl) return NS_ERROR_OUT_OF_MEMORY;    nsUnescape(unescapedUrl);  nsCOMPtr <nsIMsgMessageService> messageService; nsresult rv = GetMessageServiceFromURI(aURL, getter_AddRefs(messageService));  if (NS_SUCCEEDED(rv) && messageService) { nsCOMPtr<nsIWebShell> webShell(do_QueryInterface(mDocShell)); messageService->DisplayMessage(aURL, webShell, mMsgWindow, nsnull, nsnull, nsnull); mLastDisplayURI = aURL; }  else { nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(mDocShell)); if(webNav) rv = webNav->LoadURI(NS_ConvertASCIItoUCS2(unescapedUrl).get(), nsIWebNavigation::LOAD_FLAGS_NONE, nsnull, nsnull, nsnull); } PL_strfree(unescapedUrl); return rv;
nsMessenger::OpenURL(const char * url){	if (url)	{#ifdef DEBUG_MESSENGER		printf("nsMessenger::OpenURL(%s)\n",url);#endif    		nsIMsgMessageService * messageService = nsnull;		nsresult rv = GetMessageServiceFromURI(url, &messageService);		if (NS_SUCCEEDED(rv) && messageService)		{			messageService->DisplayMessage(url, mWebShell, nsnull, nsnull);			ReleaseMessageServiceFromURI(url, messageService);		}		//If it's not something we know about, then just load the url.		else		{			nsString urlStr(url);			mWebShell->LoadURL(urlStr.GetUnicode());		}	}	return NS_OK;}