summaryrefslogtreecommitdiff
path: root/indra/llxml
diff options
context:
space:
mode:
authorBrad Linden <brad@lindenlab.com>2024-10-31 11:42:18 -0700
committerBrad Linden <brad@lindenlab.com>2024-10-31 11:42:18 -0700
commit5fbbfb64020cf172a127841fd931024e7bdf0da1 (patch)
tree1dae52ef6f55508cbff90d7d2e8f297a4cc8c9e1 /indra/llxml
parent34e909b6bfbd99d3df481a2f6e566a0b58a15905 (diff)
parent8dfc1d0447bae8afd1567abf85ecbec9b43790a0 (diff)
Merge remote-tracking branch 'origin/release/2024.09-ExtraFPS' into develop
# Conflicts: # indra/newview/featuretable_linux.txt
Diffstat (limited to 'indra/llxml')
-rw-r--r--indra/llxml/llxmlnode.cpp23
-rw-r--r--indra/llxml/llxmlnode.h1
2 files changed, 23 insertions, 1 deletions
diff --git a/indra/llxml/llxmlnode.cpp b/indra/llxml/llxmlnode.cpp
index e695035461..92bcb1a2ae 100644
--- a/indra/llxml/llxmlnode.cpp
+++ b/indra/llxml/llxmlnode.cpp
@@ -3256,6 +3256,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;
@@ -3365,7 +3386,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;
}
diff --git a/indra/llxml/llxmlnode.h b/indra/llxml/llxmlnode.h
index 3769ec8293..09c7c4fdad 100644
--- a/indra/llxml/llxmlnode.h
+++ b/indra/llxml/llxmlnode.h
@@ -295,6 +295,7 @@ protected:
bool removeChild(LLXMLNode* child);
bool isFullyDefault();
+ std::string getXMLRPCTextContents() const;
bool parseXmlRpcArrayValue(LLSD& target);
bool parseXmlRpcStructValue(LLSD& target);