diff options
author | Eike Rathke <erack@redhat.com> | 2015-10-21 01:48:17 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-10-26 16:04:07 +0100 |
commit | 00f71864e144d6aaece315e98a264acb2d994f9c (patch) | |
tree | 9d75bf857ccbe06c566807cb6a7fba18ee39680a /l10ntools | |
parent | 4edfa23c46a63d49b8c2e00eec54c6d043b2139b (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</emph> 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
(cherry picked from commit 84017530bc5579e02fc4a2a9d31fe36a9ad28518)
Reviewed-on: https://gerrit.libreoffice.org/19524
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit a3aec6c5e784cfabc32eed93a28ee1516d4938cd)
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/source/xmlparse.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx index 0171db926342..7cd1db67dce3 100644 --- a/l10ntools/source/xmlparse.cxx +++ b/l10ntools/source/xmlparse.cxx @@ -1144,7 +1144,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 ) |