diff --git a/content/html/document/src/nsHTMLContentSink.cpp b/content/html/document/src/nsHTMLContentSink.cpp
index 6a169e65e8a4..4e34d08c9d01 100644
--- a/content/html/document/src/nsHTMLContentSink.cpp
+++ b/content/html/document/src/nsHTMLContentSink.cpp
@@ -2523,7 +2523,7 @@ HTMLContentSink::SetTitle(const nsString& aValue)
nsIDOMText* tc;
rv = text->QueryInterface(kIDOMTextIID, (void**)&tc);
if (NS_OK == rv) {
- tc->SetData(aValue);
+ tc->SetData(*mTitle);
NS_RELEASE(tc);
}
it->AppendChildTo(text, PR_FALSE);
diff --git a/layout/html/document/src/nsHTMLContentSink.cpp b/layout/html/document/src/nsHTMLContentSink.cpp
index 6a169e65e8a4..4e34d08c9d01 100644
--- a/layout/html/document/src/nsHTMLContentSink.cpp
+++ b/layout/html/document/src/nsHTMLContentSink.cpp
@@ -2523,7 +2523,7 @@ HTMLContentSink::SetTitle(const nsString& aValue)
nsIDOMText* tc;
rv = text->QueryInterface(kIDOMTextIID, (void**)&tc);
if (NS_OK == rv) {
- tc->SetData(aValue);
+ tc->SetData(*mTitle);
NS_RELEASE(tc);
}
it->AppendChildTo(text, PR_FALSE);