From 84299745249867a1e54f7794d75657f7ebb1c683 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 18 May 2014 16:34:12 +0200 Subject: [PATCH] Removed trailing hyphen from URL title --- wcfsetup/install/files/lib/system/request/LinkHandler.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/request/LinkHandler.class.php b/wcfsetup/install/files/lib/system/request/LinkHandler.class.php index 13d14d35a4..4b80cec09b 100644 --- a/wcfsetup/install/files/lib/system/request/LinkHandler.class.php +++ b/wcfsetup/install/files/lib/system/request/LinkHandler.class.php @@ -153,7 +153,7 @@ class LinkHandler extends SingletonFactory { $parameters['title'] = trim($this->titleRegex->replace($parameters['title'], '-'), '-'); // trim to 80 characters - $parameters['title'] = mb_substr($parameters['title'], 0, 80); + $parameters['title'] = rtrim(mb_substr($parameters['title'], 0, 80), '-'); // encode title if ($encodeTitle) $parameters['title'] = rawurlencode($parameters['title']); -- 2.20.1