diff options
Diffstat (limited to 'core/fxcrt/xml/cfx_xmlnode.cpp')
-rw-r--r-- | core/fxcrt/xml/cfx_xmlnode.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/core/fxcrt/xml/cfx_xmlnode.cpp b/core/fxcrt/xml/cfx_xmlnode.cpp index 1851a4d81e..5e787ed2b9 100644 --- a/core/fxcrt/xml/cfx_xmlnode.cpp +++ b/core/fxcrt/xml/cfx_xmlnode.cpp @@ -110,16 +110,18 @@ std::unique_ptr<CFX_XMLNode> CFX_XMLNode::Clone() { void CFX_XMLNode::Save(const RetainPtr<CFX_SeekableStreamProxy>& pXMLStream) {} -WideString CFX_XMLNode::EncodeEntities(WideString value) { - value.Replace(L"&", L"&"); - value.Replace(L"<", L"<"); - value.Replace(L">", L">"); - value.Replace(L"\'", L"'"); - value.Replace(L"\"", L"""); - return value; +WideString CFX_XMLNode::EncodeEntities(const WideString& value) { + WideString ret = value; + ret.Replace(L"&", L"&"); + ret.Replace(L"<", L"<"); + ret.Replace(L">", L">"); + ret.Replace(L"\'", L"'"); + ret.Replace(L"\"", L"""); + return ret; } -WideString CFX_XMLNode::AttributeToString(WideString name, WideString value) { +WideString CFX_XMLNode::AttributeToString(const WideString& name, + const WideString& value) { WideString ret = L" "; ret += name; ret += L"=\""; |