summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-10-21 01:48:17 +0200
committerEike Rathke <erack@redhat.com>2015-10-21 10:45:54 +0200
commit84017530bc5579e02fc4a2a9d31fe36a9ad28518 (patch)
tree3d43bd8785ee72742ba3aab7251a6a5b5e4d3d2d /l10ntools
parent9bfe1d13c04705ae5f27c2bf28af6f532b4e2084 (diff)
properly check for ICU status so known tags get actually recognized
nIcuErr after the second RegexMatcher::find() call was U_STRING_NOT_TERMINATED_WARNING hence a check for U_ZERO_ERROR failed and a content string of "foo <emph>bar</emph> baz" became "foo <emph>bar&lt;/emph&gt; baz" which later provoked a missing ending tag error. This should had used U_SUCCESS(nIcuErr) instead and only worked by chance. Apparently the warning wasn't issued in earlier ICU versions and only introduced with 55 or 56. Change-Id: I36482c928544fc6e8c0403997af33084a47d4bea
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/xmlparse.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index becad85f6a2e..eae496a39dba 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -1124,7 +1124,7 @@ OString XMLUtil::QuotHTML( const OString &rString )
icu::UnicodeString sReturn;
int32_t nEndPos = 0;
int32_t nStartPos = 0;
- while( aRegexMatcher.find(nStartPos, nIcuErr) && nIcuErr == U_ZERO_ERROR )
+ while( aRegexMatcher.find(nStartPos, nIcuErr) && U_SUCCESS(nIcuErr) )
{
nStartPos = aRegexMatcher.start(nIcuErr);
if ( nEndPos < nStartPos )