]> git.mxchange.org Git - friendica.git/commitdiff
Remove RTL Override character from display names to show in notifications
authorHypolite Petovan <hypolite@mrpetovan.com>
Thu, 10 Nov 2022 15:42:21 +0000 (10:42 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Thu, 10 Nov 2022 15:42:21 +0000 (10:42 -0500)
- It was causing the notification message to be unreadable

src/Navigation/Notifications/Factory/FormattedNavNotification.php

index cfb798ac7287f9c5d61ca151ad3c90778e5d11d0..2b1360eaa4f82cb9d9b33d6d40ac1545a52e4cba 100644 (file)
@@ -79,6 +79,10 @@ class FormattedNavNotification extends BaseFactory
        {
                $contact_photo = Contact::getAvatarUrlForUrl($contact_url, $this->userSession->getLocalUserId(), Proxy::SIZE_MICRO);
 
+               // Removing the RTL Override character to prevent a garbled notification message
+               // See https://github.com/friendica/friendica/issues/12084
+               $contact_name = str_replace("\xE2\x80\xAE", '', $contact_name);
+
                $dateMySQL = $date->format(DateTimeFormat::MYSQL);
 
                $templateNotify = [