, left and right brackets * * @param string $s String to be URL encoded. * @return string The URL encoded string. */ private static function encode(string $s): string { return str_replace(['<', '>', '[', ']'], ['%3c', '%3e', '%5b', '%5d'], $s); } /** * URL decode <, >, left and right brackets * * @param string $s The URL encoded string to be decoded * @return string The decoded string. */ private static function decode(string $s): string { return str_replace(['%3c', '%3e', '%5b', '%5d'], ['<', '>', '[', ']'], $s); } /** * Get file tags from array * * ex. given [music,video] return