Actions
Bug #17169
closedword spit incorrectly works with UTF-8 texts
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Indexed Search
Target version:
-
Start date:
2007-03-29
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
4.1
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
Some letters in utf-8 texts are cut, when displayed in search results. This can be fixed by adding 'u' modifier to preg_replace call in function markupSWpartsOfString:
$str = preg_replace('/\s\s+/u',' ',$str);
However, this is not considered as final solution. Probably it's better to use mb_ereg_replace instead of preg_replace
--- class.tx_indexedsearch.php.old Thu Mar 29 18:16:10 2007
+++ class.tx_indexedsearch.php Thu Mar 29 18:15:58 2007@ -1966,7 +1966,7
@
// Init:
$str = str_replace(' ',' ',t3lib_parsehtml::bidir_htmlspecialchars($str,-1));
- $str = preg_replace('/\s\s+/',' ',$str);
+ $str = preg_replace('/\s\s+/u',' ',$str);
$swForReg = array();
// Prepare search words for regex:
(issue imported from #M5322)
Actions