Fix broken emoji and other HTML entities when using cut_str()

https://xetown.com/questions/1855257
This commit is contained in:
Kijin Sung 2025-02-13 22:39:13 +09:00
parent 651fa56c4f
commit 00db2ab402
2 changed files with 4 additions and 1 deletions

View file

@ -81,6 +81,8 @@ class LegacyTest extends \Codeception\Test\Unit
{
$this->assertEquals('안녕하세요? 라이믹스...', cut_str('안녕하세요? 라이믹스입니다. 제목이 너무 길어서 잘립니다.', 20));
$this->assertEquals('Hello? This is Rhymix...', cut_str('Hello? This is Rhymix. This title is very long.', 20));
$this->assertEquals('Hello <world> 😁', cut_str('Hello <world> 😁', 20));
$this->assertEquals('Hello "Rhymix" test &...', cut_str('Hello "Rhymix" test &', 20));
}
public function testTimeFunctions()