util: allow all path chars (fix #635)

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/653/head
Varun Patil 2023-05-06 21:30:51 -07:00
parent cca54c6681
commit 2641a7619b
1 changed files with 1 additions and 1 deletions

View File

@ -299,7 +299,7 @@ class Util
*/
public static function sanitizePath(string $path)
{
$path = mb_ereg_replace('([^\\w\\s\\d\\-_~,;:!@#$&*{}\[\]\'\\[\\]\\(\\).\\\/])', '', $path);
$path = str_replace("\0", '', $path); // remove null characters
return mb_ereg_replace('\/\/+', '/', $path); // remove extra slashes
}