diff options
Diffstat (limited to 'core/fxcrt/xml/cfx_xmlchardata.cpp')
-rw-r--r-- | core/fxcrt/xml/cfx_xmlchardata.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/core/fxcrt/xml/cfx_xmlchardata.cpp b/core/fxcrt/xml/cfx_xmlchardata.cpp index 7712b30dfe..b613b15d00 100644 --- a/core/fxcrt/xml/cfx_xmlchardata.cpp +++ b/core/fxcrt/xml/cfx_xmlchardata.cpp @@ -21,10 +21,8 @@ std::unique_ptr<CFX_XMLNode> CFX_XMLCharData::Clone() { return pdfium::MakeUnique<CFX_XMLCharData>(GetText()); } -void CFX_XMLCharData::Save( - const RetainPtr<CFX_SeekableStreamProxy>& pXMLStream) { - WideString ws = L"<![CDATA["; - ws += GetText(); - ws += L"]]>"; - pXMLStream->WriteString(ws.AsStringView()); +void CFX_XMLCharData::Save(const RetainPtr<IFX_SeekableStream>& pXMLStream) { + pXMLStream->WriteString("<![CDATA["); + pXMLStream->WriteString(GetText().UTF8Encode().AsStringView()); + pXMLStream->WriteString("]]>"); } |