diff --git a/apps/files_sharing/ajax/publicpreview.php b/apps/files_sharing/ajax/publicpreview.php
index a52f522afac529e6c970816f2d0a6b9a2383a1cc..d12d212a2e64f089f68bccb13ee3da426bc93839 100644
--- a/apps/files_sharing/ajax/publicpreview.php
+++ b/apps/files_sharing/ajax/publicpreview.php
@@ -11,7 +11,7 @@ if(!\OC_App::isEnabled('files_sharing')){
 
 \OC_User::setIncognitoMode(true);
 
-$file = array_key_exists('file', $_GET) ? (string) urldecode($_GET['file']) : '';
+$file = array_key_exists('file', $_GET) ? (string) $_GET['file'] : '';
 $maxX = array_key_exists('x', $_GET) ? (int) $_GET['x'] : '36';
 $maxY = array_key_exists('y', $_GET) ? (int) $_GET['y'] : '36';
 $scalingUp = array_key_exists('scalingup', $_GET) ? (bool) $_GET['scalingup'] : true;
diff --git a/apps/files_trashbin/ajax/preview.php b/apps/files_trashbin/ajax/preview.php
index ce432f4d14eb91c520255d16b1798d4509c62e13..d003a9a0791e0e45d3a65c3e56ff6995d76b486f 100644
--- a/apps/files_trashbin/ajax/preview.php
+++ b/apps/files_trashbin/ajax/preview.php
@@ -11,7 +11,7 @@ if(!\OC_App::isEnabled('files_trashbin')){
 	exit;
 }
 
-$file = array_key_exists('file', $_GET) ? (string) urldecode($_GET['file']) : '';
+$file = array_key_exists('file', $_GET) ? (string) $_GET['file'] : '';
 $maxX = array_key_exists('x', $_GET) ? (int) $_GET['x'] : '44';
 $maxY = array_key_exists('y', $_GET) ? (int) $_GET['y'] : '44';
 $scalingUp = array_key_exists('scalingup', $_GET) ? (bool) $_GET['scalingup'] : true;
diff --git a/core/ajax/preview.php b/core/ajax/preview.php
index af0f0493f4ce67e8e7706ab2709f1a7afe930312..d85dff7632fe41779bab8baa1b134bd577b3c2ef 100644
--- a/core/ajax/preview.php
+++ b/core/ajax/preview.php
@@ -7,7 +7,7 @@
  */
 \OC_Util::checkLoggedIn();
 
-$file = array_key_exists('file', $_GET) ? (string) urldecode($_GET['file']) : '';
+$file = array_key_exists('file', $_GET) ? (string) $_GET['file'] : '';
 $maxX = array_key_exists('x', $_GET) ? (int) $_GET['x'] : '36';
 $maxY = array_key_exists('y', $_GET) ? (int) $_GET['y'] : '36';
 $scalingUp = array_key_exists('scalingup', $_GET) ? (bool) $_GET['scalingup'] : true;
@@ -26,6 +26,7 @@ if($maxX === 0 || $maxY === 0) {
 	exit;
 }
 
+
 try{
 	$preview = new \OC\Preview(\OC_User::getUser(), 'files');
 	$preview->setFile($file);