From: Alexander Ebert Date: Tue, 10 Mar 2015 11:26:35 +0000 (+0100) Subject: Fixed WCF::getRequestURI() returning garbage w/ active SEO option X-Git-Tag: 2.1.2~67 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4f86656e587a7bb62297c0e706decc214c402f68;p=GitHub%2FWoltLab%2FWCF.git Fixed WCF::getRequestURI() returning garbage w/ active SEO option --- diff --git a/wcfsetup/install/files/lib/system/WCF.class.php b/wcfsetup/install/files/lib/system/WCF.class.php index 2237973399..d2a6fed794 100644 --- a/wcfsetup/install/files/lib/system/WCF.class.php +++ b/wcfsetup/install/files/lib/system/WCF.class.php @@ -764,12 +764,10 @@ class WCF { return $baseHref . $path; } else { - $queryString = $_SERVER['QUERY_STRING']; - if (!StringUtil::isUTF8($queryString)) { - $queryString = StringUtil::convertEncoding('ISO-8859-1', 'UTF-8', $queryString); - } + $url = preg_replace('~^(https?://[^/]+)(?:/.*)?$~', '$1', self::getTPL()->get('baseHref')); + $url .= $_SERVER['REQUEST_URI']; - return self::getTPL()->get('baseHref') . ($queryString ? '?' . $queryString : ''); + return $url; } }