diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-10-31 13:08:40 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-10-31 13:08:40 +0800 |
commit | 76d31ddf9a4f8bdd94dd86053dd1296912f9c9ac (patch) | |
tree | ca0842e1c6a8ce85cfb0e0e4094651731f19d8c7 /indra/llxml/llxmlnode.cpp | |
parent | c7714fb31915b70af4ca24cde61751484dd967e9 (diff) | |
parent | 4b5fa5349e06ce3471875e0c401f9119831ed887 (diff) |
Merge remote-tracking branch 'secondlife/release/2024.09-ExtraFPS' into 2024.09-ExtraFPS
Diffstat (limited to 'indra/llxml/llxmlnode.cpp')
-rw-r--r-- | indra/llxml/llxmlnode.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/indra/llxml/llxmlnode.cpp b/indra/llxml/llxmlnode.cpp index c5ecc67025..48805f8240 100644 --- a/indra/llxml/llxmlnode.cpp +++ b/indra/llxml/llxmlnode.cpp @@ -3259,6 +3259,27 @@ std::string LLXMLNode::getTextContents() const return msg; } +std::string LLXMLNode::getXMLRPCTextContents() const +{ + std::string msg; + std::string::size_type start = mValue.find_first_not_of(" \t\n"); + if (start != mValue.npos) + { + std::string::size_type end = mValue.find_last_not_of(" \t\n"); + if (end != mValue.npos) + { + msg = mValue.substr(start, end + 1 - start); + } + else + { + msg = mValue.substr(start); + } + } + // Convert any internal CR to LF + msg = utf8str_removeCRLF(msg); + return msg; +} + void LLXMLNode::setLineNumber(S32 line_number) { mLineNumber = line_number; @@ -3368,7 +3389,7 @@ bool LLXMLNode::fromXMLRPCValue(LLSD& target) if (childp->hasName("string")) { - target.assign(LLStringFn::xml_decode(childp->getTextContents())); + target.assign(LLStringFn::xml_decode(childp->getXMLRPCTextContents())); return true; } |