add trim to filterInfoHash method

This commit is contained in:
ghost 2023-09-04 01:38:55 +03:00
parent 6c73a68024
commit c32a3b5f7d

View file

@ -21,7 +21,8 @@ class Magnet {
public static function filterInfoHash(string $value) : string public static function filterInfoHash(string $value) : string
{ {
return str_replace( return trim(
str_replace(
[ [
'urn:', 'urn:',
'btih:', 'btih:',
@ -29,6 +30,7 @@ class Magnet {
], ],
false, false,
$value $value
)
); );
} }