diff options
author | Richard Nelson <none@none> | 2010-08-06 11:49:43 -0700 |
---|---|---|
committer | Richard Nelson <none@none> | 2010-08-06 11:49:43 -0700 |
commit | 7b41819377ec1c6ffc835a0a05a1acf571f46aad (patch) | |
tree | a9d73c6a2aba34e344409f5a6fc6cd249e669d4a | |
parent | 5866710be7b64999ec82c5cd5e2d47d81fdeb918 (diff) |
removed spurious parsing of empty text contents
-rw-r--r-- | indra/llxuixml/llxuiparser.cpp | 14 |
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(); |