Removed trailing hyphen from URL title
authorAlexander Ebert <ebert@woltlab.com>
Sun, 18 May 2014 14:34:12 +0000 (16:34 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 18 May 2014 14:34:12 +0000 (16:34 +0200)
wcfsetup/install/files/lib/system/request/LinkHandler.class.php

index 13d14d35a4cc45beaf33f2b89684b5966e535bf1..4b80cec09bc81980c9161a07555a24cd5ef919cc 100644 (file)
@@ -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']);