Added fix for broken UTF-8 2 byte characters
This commit is contained in:
parent
0c3b239417
commit
43da0ac172
1 changed files with 2 additions and 2 deletions
|
@ -225,11 +225,11 @@ class String
|
||||||
{
|
{
|
||||||
if ($hover == true)
|
if ($hover == true)
|
||||||
{
|
{
|
||||||
$string = '<span title="' . $string . '">' . substr($string, 0, $length) . '…</span>';
|
$string = '<span title="' . $string . '">' . mb_strcut($string, 0, $length, 'UTF-8') . '…</span>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$string = substr($string, 0, $length) . '...';
|
$string = mb_strcut($string, 0, $length, 'UTF-8') . '…';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue