mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-08-09 14:56:32 +02:00
Fix path normalization (broke paths containing '+' characters).
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
function normalize_path($path, $trailing_slash = false) {
|
function normalize_path($path, $trailing_slash = false) {
|
||||||
|
|
||||||
$path = preg_replace("#\\+|/+#", "/", $path);
|
$path = preg_replace("#\\\\+|/+#", "/", $path);
|
||||||
return preg_match("#^(\w:)?/$#", $path) ? $path : (rtrim($path, "/") . ($trailing_slash ? "/" : ""));
|
return preg_match("#^(\w:)?/$#", $path) ? $path : (rtrim($path, "/") . ($trailing_slash ? "/" : ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user