summaryrefslogtreecommitdiff
path: root/core/fxcrt/xml/cfx_xmlchardata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/xml/cfx_xmlchardata.cpp')
-rw-r--r--core/fxcrt/xml/cfx_xmlchardata.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/fxcrt/xml/cfx_xmlchardata.cpp b/core/fxcrt/xml/cfx_xmlchardata.cpp
index 902d139c99..7712b30dfe 100644
--- a/core/fxcrt/xml/cfx_xmlchardata.cpp
+++ b/core/fxcrt/xml/cfx_xmlchardata.cpp
@@ -20,3 +20,11 @@ FX_XMLNODETYPE CFX_XMLCharData::GetType() const {
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());
+}