diff --git a/php/elFinderVolumeDriver.class.php b/php/elFinderVolumeDriver.class.php index c2d2b46406..c81bc2a946 100644 --- a/php/elFinderVolumeDriver.class.php +++ b/php/elFinderVolumeDriver.class.php @@ -4090,6 +4090,8 @@ protected function doSearch($path, $q, $mimes) { $path = str_replace($this->separator, '/', substr($p, strlen($this->root) + 1)); if ($this->encoding) { $path = str_replace('%2F', '/', rawurlencode($this->convEncIn($path, true))); + } else { + $path = str_replace('%2F', '/', rawurlencode($path)); } $stat['url'] = $this->URL . $path; } diff --git a/php/elFinderVolumeLocalFileSystem.class.php b/php/elFinderVolumeLocalFileSystem.class.php index 374c11ae8c..22411e50a2 100644 --- a/php/elFinderVolumeLocalFileSystem.class.php +++ b/php/elFinderVolumeLocalFileSystem.class.php @@ -1245,7 +1245,7 @@ protected function doSearch($path, $q, $mimes) { $stat['path'] = $this->path($stat['hash']); if ($this->URL && !isset($stat['url'])) { $_path = str_replace(DIRECTORY_SEPARATOR, '/', substr($p, strlen($this->root) + 1)); - $stat['url'] = $this->URL . $_path; + $stat['url'] = $this->URL . str_replace('%2F', '/', rawurlencode($_path)); } $result[] = $stat;