Checking in for kaie@netscape.com: Hacky fix to guarantee that HTML messages don't get eaten because of missing </title>. b=195020, r=harishd@netscape.com, sr=peterv@netscape.com

This commit is contained in:
harishd%netscape.com 2003-04-22 17:27:29 +00:00
parent c7f40ed067
commit 7ac1abf691

View File

@ -369,9 +369,13 @@ mozSanitizingHTMLSerializer::SetTitle(const nsString& aValue)
{ {
if (IsAllowedTag(eHTMLTag_title)) if (IsAllowedTag(eHTMLTag_title))
{ {
//Write(NS_LITERAL_STRING("<title>")); -- aValue already contains that // See bug 195020 for a good reason to output the tags.
// It will make sure we have a closing tag, and a
// missing </title> tag won't result in everything
// being eaten up as the title.
Write(NS_LITERAL_STRING("<title>"));
Write(aValue); Write(aValue);
//Write(NS_LITERAL_STRING("</title>")); Write(NS_LITERAL_STRING("</title>"));
} }
return NS_OK; return NS_OK;
} }