Index: formatting.cpp =================================================================== --- formatting.cpp (revision 35) +++ formatting.cpp (working copy) @@ -752,3 +754,24 @@ lstrcpyA(szText, text.c_str()); return szText; } + +typedef std::basic_string> tstring; + +extern "C" const TCHAR *DoubleAmpersands(TCHAR *pszText) + { + tstring text(pszText); + unsigned int textPos = 0; + + while (TRUE) { + if ((textPos = text.find(_T("&"),textPos)) != text.npos) { + text.insert(textPos,__T("%")); + text.replace(textPos, 2, __T("&&")); + textPos+=2; + continue; + } else + break; + } + + _tcscpy(pszText, text.c_str()); + return pszText; + } \ No newline at end of file Index: msgs.c =================================================================== --- msgs.c (revision 36) +++ msgs.c (working copy) @@ -105,6 +105,7 @@ extern ICONDESC *g_skinIcons; extern int g_nrSkinIcons; extern struct RTFColorTable *rtf_ctable; +extern TCHAR *DoubleAmpersands(TCHAR *pszText); HANDLE g_hEvent_MsgWin; HANDLE g_hEvent_MsgPopup; @@ -1756,6 +1757,7 @@ lstrcpyn(newcontactname, contactName, safe_sizeof(newcontactname)); newcontactname[127] = 0; } + DoubleAmpersands(newcontactname); } else lstrcpyn(newcontactname, _T("_U_"), safe_sizeof(newcontactname)); Index: msgdialog.c =================================================================== --- msgdialog.c (revision 36) +++ msgdialog.c (working copy) @@ -64,6 +64,7 @@ extern char *FilterEventMarkersA(char *szText); extern WCHAR *FilterEventMarkers(WCHAR *wszText); +extern TCHAR *DoubleAmpersands(TCHAR *pszText); TCHAR *xStatusDescr[] = { _T("Angry"), _T("Duck"), _T("Tired"), _T("Party"), _T("Beer"), _T("Thinking"), _T("Eating"), _T("TV"), _T("Friends"), _T("Coffee"), _T("Music"), _T("Business"), _T("Camera"), _T("Funny"), @@ -2576,6 +2577,8 @@ CutContactName(dat->szNickname, newcontactname, safe_sizeof(newcontactname)); else lstrcpyn(newcontactname, dat->szNickname, safe_sizeof(newcontactname)); + + DoubleAmpersands(newcontactname); if (lstrlen(newcontactname) != 0 && dat->szStatus != NULL) { if (myGlobals.m_StatusOnTabs) Index: tabctrl.c =================================================================== --- tabctrl.c (revision 35) +++ tabctrl.c (working copy) @@ -383,7 +383,7 @@ TCITEM item = {0}; struct MessageWindowData *dat = 0; int iSize = 16; - DWORD dwTextFlags = DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX; + DWORD dwTextFlags = DT_SINGLELINE | DT_VCENTER/* | DT_NOPREFIX*/; BOOL leftMost = FALSE; item.mask = TCIF_PARAM;