From a7f8ccabddf8419c017485e865885833ec6f3882 Mon Sep 17 00:00:00 2001 From: nixxquality Date: Wed, 18 Feb 2015 15:11:42 +0100 Subject: [PATCH 1/2] Fix opening php tag --- includes/core.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/core.php b/includes/core.php index 80cd0b6..3be8288 100644 --- a/includes/core.php +++ b/includes/core.php @@ -1,4 +1,4 @@ -?php + Date: Wed, 18 Feb 2015 15:12:28 +0100 Subject: [PATCH 2/2] URL encode the returned filename --- includes/core.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/core.php b/includes/core.php index 3be8288..8e4c0bf 100644 --- a/includes/core.php +++ b/includes/core.php @@ -22,7 +22,7 @@ function save_file ($file, $name, $arg){ //Move the file to the above location with said filename move_uploaded_file($file,$path.$file_name); //Return url+filename to the user - echo 'http://a.uguu.se/'.$file_name; + echo 'http://a.uguu.se/'.urlencode($file_name); } function gen_name($arg, $in){ $chars = 'abcdefghijklmnopqrstuvwxyz';