From 19c8cd5f8801177313660e3e4dcf8364950f98f0 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Thu, 9 May 2013 14:27:17 +0200 Subject: [PATCH] Fixed links in RSS feeds --- .../install/files/lib/system/request/LinkHandler.class.php | 7 +++++++ 1 file changed, 7 insertions(+) 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; -- 2.20.1