From 18890d81240129f9561517ee6ae992e7a3d1e00a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Wed, 7 Feb 2024 13:28:33 +0100 Subject: [PATCH] page_title: bugfix in fallback to page url --- tools.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools.sh b/tools.sh index 248a254..a85e63c 100755 --- a/tools.sh +++ b/tools.sh @@ -207,7 +207,8 @@ page_title() { ' )" if [ ! "${PAGE_TITLE}" ]; then - PAGE_TITLE="${1:-${PATH_INFO%/*}}" + PAGE_TITLE="${1:-${PATH_INFO}}" + PAGE_TITLE="${PAGE_TITLE%/*}" PAGE_TITLE="${PAGE_TITLE##*/}" fi printf %s\\n "$PAGE_TITLE" -- 2.39.2