mirror of
https://github.com/koel/koel
synced 2024-12-25 20:13:06 +00:00
16 lines
355 B
PHP
16 lines
355 B
PHP
<?php
|
|
|
|
namespace App\Values;
|
|
|
|
trait FormatsLastFmText
|
|
{
|
|
/**
|
|
* Correctly format a value returned by Last.fm.
|
|
*/
|
|
private static function formatLastFmText(?string $value): string
|
|
{
|
|
return $value
|
|
? trim(str_replace('Read more on Last.fm', '', nl2br(strip_tags(html_entity_decode($value)))))
|
|
: '';
|
|
}
|
|
}
|