diff --git a/lib/Reference/ProfilePickerReferenceProvider.php b/lib/Reference/ProfilePickerReferenceProvider.php index 208055f7f..735e83899 100644 --- a/lib/Reference/ProfilePickerReferenceProvider.php +++ b/lib/Reference/ProfilePickerReferenceProvider.php @@ -126,7 +126,11 @@ public function resolveReference(string $referenceText): ?IReference { 'title' => $userDisplayName, 'subline' => $userEmail ?? $userDisplayName, 'email' => $userEmail, - 'bio' => isset($bio) && $bio !== '' ? substr_replace($bio, '...', 80, strlen($bio)) : null, + 'bio' => isset($bio) && $bio !== '' + ? (mb_strlen($bio) > 80 + ? (mb_substr($bio, 0, 80) . '...') + : $bio) + : null, 'headline' => $headline->getScope() !== IAccountManager::SCOPE_PRIVATE ? $headline->getValue() : null, 'location' => $location->getScope() !== IAccountManager::SCOPE_PRIVATE ? $location->getValue() : null, 'location_url' => $location->getScope() !== IAccountManager::SCOPE_PRIVATE ? $this->getOpenStreetLocationUrl($location->getValue()) : null,