diff --git a/content/html/content/src/nsTextEditorState.cpp b/content/html/content/src/nsTextEditorState.cpp index f17aae4c718e..9fa3cfe72cfc 100644 --- a/content/html/content/src/nsTextEditorState.cpp +++ b/content/html/content/src/nsTextEditorState.cpp @@ -1764,7 +1764,7 @@ nsTextEditorState::SetValue(const nsAString& aValue, PRBool aUserInput) } nsString value(aValue); nsContentUtils::PlatformToDOMLineBreaks(value); - *mValue = ToNewUTF8String(value); + CopyUTF16toUTF8(value, *mValue); // Update the frame display if needed if (mBoundFrame) {