Fix for Bug# 7957.

Always set the first "Title".
This commit is contained in:
harishd%netscape.com 1999-06-28 19:56:10 +00:00
parent f29a859702
commit 04bc04532e
2 changed files with 8 additions and 2 deletions

View File

@ -1662,7 +1662,10 @@ HTMLContentSink::SetTitle(const nsString& aValue)
mTitle = new nsString(aValue);
}
else {
*mTitle = aValue;
// If the title was already set then don't try to overwrite it
// when a new title is encountered - For backwards compatiblity
//*mTitle = aValue;
return NS_OK;
}
ReduceEntities(*mTitle);
mTitle->CompressWhitespace(PR_TRUE, PR_TRUE);

View File

@ -1662,7 +1662,10 @@ HTMLContentSink::SetTitle(const nsString& aValue)
mTitle = new nsString(aValue);
}
else {
*mTitle = aValue;
// If the title was already set then don't try to overwrite it
// when a new title is encountered - For backwards compatiblity
//*mTitle = aValue;
return NS_OK;
}
ReduceEntities(*mTitle);
mTitle->CompressWhitespace(PR_TRUE, PR_TRUE);