1
0
mirror of https://github.com/freescout-helpdesk/freescout.git synced 2024-11-24 03:12:46 +01:00

Replace new lines with spaces in conversation previews - closes #2711

This commit is contained in:
FreeScout 2023-02-12 00:14:53 -08:00
parent 3786da3544
commit c109a0abd6

View File

@ -540,6 +540,11 @@ class Helper
*/
public static function textPreview($text, $length = self::PREVIEW_MAXLENGTH)
{
$text = strtr($text, [
'</div>' => ' </div>',
'</p>' => ' </p>'
]);
$text = self::stripTags($text);
$text = mb_substr($text, 0, $length);