summaryrefslogtreecommitdiff
path: root/indra/llxuixml
diff options
context:
space:
mode:
authorRichard Nelson <none@none>2010-08-06 11:49:43 -0700
committerRichard Nelson <none@none>2010-08-06 11:49:43 -0700
commit7b41819377ec1c6ffc835a0a05a1acf571f46aad (patch)
treea9d73c6a2aba34e344409f5a6fc6cd249e669d4a /indra/llxuixml
parent5866710be7b64999ec82c5cd5e2d47d81fdeb918 (diff)
removed spurious parsing of empty text contents
Diffstat (limited to 'indra/llxuixml')
-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();