mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-29 22:45:14 -04:00
Fix path normalization (broke paths containing '+' characters).
This commit is contained in:
parent
f56a67af9e
commit
61301b3f98
1 changed files with 1 additions and 1 deletions
|
@ -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 ? "/" : ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue