fix: [Freetext import] handle end of sentence periods and brackets better, fixes #7163

pull/7167/head
iglocska 2021-03-05 11:56:32 +01:00
parent 941981813a
commit fe1034b461
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 4 additions and 0 deletions

View File

@ -217,6 +217,10 @@ class ComplexTypeTool
$iocArray = array_merge($iocArray, $this->__returnOddElements($quotedText));
$resultArray = array();
foreach ($iocArray as $ioc) {
// remove trailing .
$ioc = rtrim($ioc, '.');
// remove brackets if enclosed
$ioc = trim($ioc, '()');
$ioc = str_replace("\xc2\xa0", '', $ioc); // remove non breaking space
$ioc = trim($ioc, $charactersToTrim);
$ioc = preg_replace('/\p{C}+/u', '', $ioc);