summaryrefslogtreecommitdiff
path: root/core/fxcrt/xml/cfx_xmlelement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/xml/cfx_xmlelement.cpp')
-rw-r--r--core/fxcrt/xml/cfx_xmlelement.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fxcrt/xml/cfx_xmlelement.cpp b/core/fxcrt/xml/cfx_xmlelement.cpp
index cab15f24c4..5e79da63cf 100644
--- a/core/fxcrt/xml/cfx_xmlelement.cpp
+++ b/core/fxcrt/xml/cfx_xmlelement.cpp
@@ -97,10 +97,10 @@ void CFX_XMLElement::SetTextData(const WideString& wsText) {
}
void CFX_XMLElement::Save(const RetainPtr<IFX_SeekableStream>& pXMLStream) {
- ByteStringView name_encoded = name_.UTF8Encode().AsStringView();
+ ByteString bsNameEncoded = name_.UTF8Encode();
pXMLStream->WriteString("<");
- pXMLStream->WriteString(name_encoded);
+ pXMLStream->WriteString(bsNameEncoded.AsStringView());
for (auto it : attrs_) {
// Note, the space between attributes is added by AttributeToString which
@@ -121,7 +121,7 @@ void CFX_XMLElement::Save(const RetainPtr<IFX_SeekableStream>& pXMLStream) {
pChild->Save(pXMLStream);
}
pXMLStream->WriteString("</");
- pXMLStream->WriteString(name_encoded);
+ pXMLStream->WriteString(bsNameEncoded.AsStringView());
pXMLStream->WriteString(">\n");
}