diff --git a/src/nex.php b/src/nex.php index 5b2f17f..ff038bb 100644 --- a/src/nex.php +++ b/src/nex.php @@ -185,15 +185,15 @@ $server->start( // Filter goal request $goal = preg_replace( [ + '/\\\/', // unify separators '/(^|\/)[\.]+/', // hidden items started with dot '/[\.]+\//', // relative directory paths '/[\/]+\//', // remove extra slashes ], DIRECTORY_SEPARATOR, - NEXT_PATH . trim( - str_replace( - '\\', '/', filter_var($request, FILTER_SANITIZE_URL) - ) + NEXT_PATH . filter_var( + $request, + FILTER_SANITIZE_URL ) );