From: Marcel Werk Date: Thu, 9 May 2013 12:27:17 +0000 (+0200) Subject: Fixed links in RSS feeds X-Git-Tag: 2.0.0_Beta_1~225 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=19c8cd5f8801177313660e3e4dcf8364950f98f0;p=GitHub%2FWoltLab%2FWCF.git Fixed links in RSS feeds --- diff --git a/wcfsetup/install/files/lib/system/request/LinkHandler.class.php b/wcfsetup/install/files/lib/system/request/LinkHandler.class.php index f59732508b..dd38afdf94 100644 --- a/wcfsetup/install/files/lib/system/request/LinkHandler.class.php +++ b/wcfsetup/install/files/lib/system/request/LinkHandler.class.php @@ -46,6 +46,7 @@ class LinkHandler extends SingletonFactory { $isACP = $originIsACP = RequestHandler::getInstance()->isACPRequest(); $isRaw = false; $appendSession = true; + $encodeTitle = false; if (isset($parameters['application'])) { $abbreviation = $parameters['application']; unset($parameters['application']); @@ -74,6 +75,10 @@ class LinkHandler extends SingletonFactory { } unset($parameters['forceFrontend']); } + if (isset($parameters['encodeTitle'])) { + $encodeTitle = $parameters['encodeTitle']; + unset($parameters['encodeTitle']); + } // remove anchor before parsing if (($pos = strpos($url, '#')) !== false) { @@ -107,6 +112,8 @@ class LinkHandler extends SingletonFactory { if (isset($parameters['title'])) { // remove illegal characters $parameters['title'] = trim($this->titleRegex->replace($parameters['title'], '-'), '-'); + // encode title + if ($encodeTitle) $parameters['title'] = rawurlencode($parameters['title']); } $parameters['controller'] = $controller;