From 348d4940d3fb68ffc8c079eb6078455ebfadf038 Mon Sep 17 00:00:00 2001 From: yggverse Date: Sat, 27 Apr 2024 04:07:27 +0300 Subject: [PATCH] simplify construction --- src/nex.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 ) );