diff --git a/mozilla/content/html/document/src/nsHTMLContentSink.cpp b/mozilla/content/html/document/src/nsHTMLContentSink.cpp
index c6e0ec98b06..33e091a1c92 100644
--- a/mozilla/content/html/document/src/nsHTMLContentSink.cpp
+++ b/mozilla/content/html/document/src/nsHTMLContentSink.cpp
@@ -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);
diff --git a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp
index c6e0ec98b06..33e091a1c92 100644
--- a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp
+++ b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp
@@ -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);