Prevent double slashes at the end of URL

This commit is contained in:
Yorin Anne De Jong 2017-11-11 15:44:23 +01:00
parent 6364325198
commit 53aec5edf5
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ function navbar($depth, $active = NULL) {
];
foreach($menuItems as $caption => $link) {
$result .= "\t\t<li" . ($active === $link ? ' class="active"' : '') . '>'
. '<a href="' . str_repeat('../', $depth) . $link . '/">'
. '<a href="' . rtrim(str_repeat('../', $depth) . $link, '/') . '/">'
. $caption
. "</a></li>\n"
;