Commit 7eb19446 authored by Tymoteusz Motylewski's avatar Tymoteusz Motylewski Committed by Benni Mack
Browse files

[BUGFIX] Remove whitespaces in the indexed search body description

The indexed search body description has a character length limit,
so it's important to remove unnecessary white spaces, so more text
will fit.

Resolves: #46298
Releases: master
Change-Id: Icc7a5833b2d6d22e631e8e376a00df9d3a838511

Reviewed-by: Wouter Wolters's avatarWouter Wolters <>
Tested-by: Wouter Wolters's avatarWouter Wolters <>
Reviewed-by: Benni Mack's avatarBenjamin Mack <>
Tested-by: Benni Mack's avatarBenjamin Mack <>
parent a058e277
......@@ -1280,7 +1280,7 @@ class Indexer {
// Setting description
$maxL = MathUtility::forceIntegerInRange($this->conf['index_descrLgd'], 0, 255, 200);
if ($maxL) {
$bodyDescription = str_replace(array(' ', TAB, CR, LF), ' ', $contentArr['body']);
$bodyDescription = preg_replace('/\s+/u', ' ', $contentArr['body']);
// Shorten the string:
$bodyDescription = $this->csObj->strtrunc('utf-8', $bodyDescription, $maxL);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment