Closed Bug 140 Opened 27 years ago Closed 26 years ago

''&'' not correctly displated in doc title

Categories

(MozillaClassic Graveyard :: Windows FE, defect, P3)

1998-03-31
x86
Windows NT
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: ben, Assigned: blythe)

Details

Created by Ben Laurie (ben@algroup.co.uk) on Friday, April 10, 1998 2:12:58 PM PDT Additional Details : OK, it''s a small thing, and it''s MS''s fault, but it has always annoyed me. Ampersands don''t get displayed correctly in the title bar on Windows. This fixes it. Give me CVS access and I''ll fix it everywhere :-) In cmd/winfe/genchrom.cpp: void CGenericChrome::SetDocumentTitle(const char *lpszText) and void CGenericChrome::SetWindowTitle(const char *lpszText) (so why doesn''t one of these call the other?) should look like this: void CGenericChrome::SetWindowTitle(const char *lpszText) { m_csWindowTitle = lpszText; CString cs; cs = "Ben " + m_csDocTitle; if (!m_csDocTitle.IsEmpty()) { cs += " - "; } cs += m_csWindowTitle; #if 1 // Ben fix ''&'' in title char *buf=(char *)alloca(cs.GetLength()*2+1); int s,d; for(s=d=0 ; s < cs.GetLength() ; ++d,++s) { if(cs[s] == ''&'') buf[d++]=''&''; buf[d]=cs[s]; } buf[d]=''\0''; m_pParent->SetWindowText(buf); #else m_pParent->SetWindowText(cs); #endif }
Assignee: nobody → blythe
Component: Windows FE
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
I get ampersands just fine under windows 98, so I did not activate your fix. Is this an NT specific problem you are reporting? I checking in to avoid the code duplication of the functions you pointed out. Reopen this bug if you have a test case which exhibits the problem, or if this should by NT specific. thanks, garrett.
Status: RESOLVED → VERIFIED
Old bug....old code base...marking Verified.
You need to log in before you can comment on or make changes to this bug.