Skip to content

Commit 484c7d1

Browse files
authored
Merge pull request #75 from HiEventsDev/develop
Fix encoding issues causing message index endpoint to fail
2 parents ba5947a + ee1d73b commit 484c7d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/app/Helper/StringHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public static function previewFromHtml(string $text, int $length = 100): string
1212
$text = trim(preg_replace('/\s+/', ' ', $text));
1313

1414
if (strlen($text) > $length) {
15-
$text = substr($text, 0, $length - 3) . '...';
15+
$text = mb_substr($text, 0, $length - 3) . '...';
1616
}
1717

1818
return $text;

0 commit comments

Comments
 (0)