summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llxuixml/llxuiparser.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/indra/llxuixml/llxuiparser.cpp b/indra/llxuixml/llxuiparser.cpp
index e010b4c125..b3cb71cd61 100644
--- a/indra/llxuixml/llxuiparser.cpp
+++ b/indra/llxuixml/llxuiparser.cpp
@@ -1199,11 +1199,15 @@ void LLSimpleXUIParser::endElement(const char *name)
{
if (!mTextContents.empty())
{
- mNameStack.push_back(std::make_pair(std::string("value"), newParseGeneration()));
- mCurAttributeValueBegin = mTextContents.c_str();
- mBlock->submitValue(mNameStack, *this);
- mNameStack.pop_back();
- mTextContents.clear();
+ LLStringUtil::trim(mTextContents);
+ if (!mTextContents.empty())
+ {
+ mNameStack.push_back(std::make_pair(std::string("value"), newParseGeneration()));
+ mCurAttributeValueBegin = mTextContents.c_str();
+ mBlock->submitValue(mNameStack, *this, false);
+ mNameStack.pop_back();
+ mTextContents.clear();
+ }
}
mCurReadDepth--;
S32 num_tokens_to_pop = mTokenSizeStack.back();