Fixed XF\Mvc\Router::prepareStringForUrl contains tiny amount of uneeded code

Steffen

Well-known member
Licensed customer
Affected version
2.3.3
There are no double quotes left after the immediately preceeding strtr call (not completely visible in the diff below) which replaces double quotes with a space character.

Diff:
--- a/src/XF/Mvc/Router.php
+++ b/src/XF/Mvc/Router.php
@@ -581,7 +581,7 @@ class Router
            '`!"$%^&*()-+={}[]<>;:@#~,./?|' . "\r\n\t\\",
            '                             ' . '    '
        );
-       $string = strtr($string, ['"' => '', "'" => '']);
+       $string = strtr($string, ["'" => '']);
 
        $string = preg_replace('/ +/', '-', trim($string));
        $string = strtr($string, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz');
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.3.4).

Change log:
Only try to remove double quotes from URL strings once
There may be a delay before changes are rolled out to the XenForo Community.
 
Back
Top Bottom