From bd09e2aae6835a79da8c699af6225f385915c6d0 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Tue, 20 Sep 2022 15:44:04 +0800 Subject: [PATCH] fix: path == '/' --- web/app/models/HTML.php | 4 +++- web/app/views/main-nav.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/web/app/models/HTML.php b/web/app/models/HTML.php index 8c50e95..e1d7dd7 100644 --- a/web/app/models/HTML.php +++ b/web/app/models/HTML.php @@ -97,8 +97,10 @@ class HTML { // } if ($param) { $url .= $path.'?'.HTML::query_string_encode($param); - } else if ($url != '/') { + } else if ($path != '/') { $url .= rtrim($path, '/'); + } else { + $url = $path; } return HTML::escape($url); } diff --git a/web/app/views/main-nav.php b/web/app/views/main-nav.php index 65d8b68..c51f7fa 100644 --- a/web/app/views/main-nav.php +++ b/web/app/views/main-nav.php @@ -1,5 +1,5 @@