Follow-up to #10327: [felogin] redirecting to referer does not work
[Packages/TYPO3.CMS.git] / typo3 / class.browse_links.php
index 5fae15e..c6d7122 100644 (file)
@@ -2575,7 +2575,8 @@ class browse_links {
                                } else {        // URL is a page (id parameter)
                                        $uP=parse_url($rel);
                                        if (!trim($uP['path'])) {
-                                               $pp = explode('id=',$uP['query']);
+                                               $pp = preg_split('/^id=/', $uP['query']);
+                                               $pp[1] = preg_replace( '/&id=[^&]*/', '', $pp[1]);
                                                $parameters = explode('&', $pp[1]);
                                                $id = array_shift($parameters);
                                                if ($id)        {