Fixed broken to top/bottom links
authorMarcel Werk <burntime@woltlab.com>
Sat, 8 Dec 2012 23:24:46 +0000 (00:24 +0100)
committerMarcel Werk <burntime@woltlab.com>
Sat, 8 Dec 2012 23:24:46 +0000 (00:24 +0100)
wcfsetup/install/files/lib/system/WCF.class.php

index c68ea40b249b978ebce6fde968a4220a95722f06..61ee8afdeda88a9ade2330db8fcf06f69aae5f7b 100644 (file)
@@ -676,6 +676,10 @@ 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);
+               }
                $baseHref = self::getTPL()->get('baseHref');
                
                return $baseHref . 'index.php' . $path . '#' . $fragment;