From b02442ff2261325c17c936641c04ce0ce432da1e Mon Sep 17 00:00:00 2001 From: 8chan Date: Tue, 5 May 2015 22:40:35 -0700 Subject: [PATCH] URL encode filename in API due to new file boards which allow filenames that are not just numbers. --- inc/api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/api.php b/inc/api.php index b278da96..9972deb6 100644 --- a/inc/api.php +++ b/inc/api.php @@ -92,7 +92,7 @@ class Api { $apiPost['filename'] = @substr($file->name, 0, strrpos($file->name, '.')); $dotPos = strrpos($file->file, '.'); $apiPost['ext'] = substr($file->file, $dotPos); - $apiPost['tim'] = substr($file->file, 0, $dotPos); + $apiPost['tim'] = urlencode(substr($file->file, 0, $dotPos)); if (isset($file->hash)) $apiPost['md5'] = base64_encode(hex2bin($file->hash)); }