diff --git a/mozilla/htmlparser/src/nsHTMLContentSinkStream.cpp b/mozilla/htmlparser/src/nsHTMLContentSinkStream.cpp index 7dc348a434a..9d9e6990e84 100644 --- a/mozilla/htmlparser/src/nsHTMLContentSinkStream.cpp +++ b/mozilla/htmlparser/src/nsHTMLContentSinkStream.cpp @@ -515,7 +515,9 @@ nsHTMLContentSinkStream::OpenHTML(const nsIParserNode& aNode) // See bug 20246: the html tag doesn't have "html" in its text, // so AddStartTag will do the wrong thing Write(kLessThan); - nsAutoCString tagname( nsString(nsHTMLTags::GetStringValue(tag)) ); + + nsString temp; temp.AssignWithConversion(nsHTMLTags::GetStringValue(tag)); + nsAutoCString tagname(temp); Write(tagname); Write(kGreaterThan); } diff --git a/mozilla/parser/htmlparser/src/nsHTMLContentSinkStream.cpp b/mozilla/parser/htmlparser/src/nsHTMLContentSinkStream.cpp index 7dc348a434a..9d9e6990e84 100644 --- a/mozilla/parser/htmlparser/src/nsHTMLContentSinkStream.cpp +++ b/mozilla/parser/htmlparser/src/nsHTMLContentSinkStream.cpp @@ -515,7 +515,9 @@ nsHTMLContentSinkStream::OpenHTML(const nsIParserNode& aNode) // See bug 20246: the html tag doesn't have "html" in its text, // so AddStartTag will do the wrong thing Write(kLessThan); - nsAutoCString tagname( nsString(nsHTMLTags::GetStringValue(tag)) ); + + nsString temp; temp.AssignWithConversion(nsHTMLTags::GetStringValue(tag)); + nsAutoCString tagname(temp); Write(tagname); Write(kGreaterThan); }