Fixed broken to top/bottom links
authorMarcel Werk <burntime@woltlab.com>
Sun, 9 Dec 2012 16:08:34 +0000 (17:08 +0100)
committerMarcel Werk <burntime@woltlab.com>
Sun, 9 Dec 2012 16:08:34 +0000 (17:08 +0100)
wcfsetup/install/files/lib/system/WCF.class.php

index ae6de14ef41b0183ed19dcc9180f9795c7e5c565..49c814e933c25d91d5c4ae1f74253757e9d67c88 100644 (file)
@@ -680,9 +680,8 @@ class WCF {
                }
                
                $path = str_replace('/index.php', '', str_replace($scriptName, '', $_SERVER['REQUEST_URI']));
-               $encoding = mb_detect_encoding($path, 'ISO-8859-1,UTF-8', true);
-               if ($encoding != 'UTF-8') {
-                       $path = StringUtil::convertEncoding($encoding, 'UTF-8', $path);
+               if (!StringUtil::isASCII($path) && !StringUtil::isUTF8($path)) {
+                       $path = StringUtil::convertEncoding('ISO-8859-1', 'UTF-8', $path);
                }
                $baseHref = self::getTPL()->get('baseHref');