Fixed bug #12845: RTE link query parameters cannot contain "id="
authorStanislas Rolland <typo3@sjbr.ca>
Sat, 20 Mar 2010 22:25:14 +0000 (22:25 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Sat, 20 Mar 2010 22:25:14 +0000 (22:25 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7139 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_parsehtml_proc.php
typo3/class.browse_links.php

index 741b2d9..a662f09 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2010-03-20  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Added feature #13870: htmlArea RTE: Extjize the spell checker
+       * Fixed bug #12845: RTE link query parameters cannot contain "id="
 
 2010-03-20  Andreas Otto  <andreas@otto-hanika.de>
 
index ed151bf..7279eee 100644 (file)
@@ -1543,7 +1543,9 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                                        $info['url']=$info['relUrl'];
                                        $info['type']='anchor';
                                } elseif (!trim($uP['path']) || !strcmp($uP['path'],'index.php'))       {
-                                       $pp = explode('id=',$uP['query']);
+                                               // URL is a page (id parameter)
+                                       $pp = preg_split('/^id=/', $uP['query']);
+                                       $pp[1] = preg_replace( '/&id=[^&]*/', '', $pp[1]);
                                        $parameters = explode('&', $pp[1]);
                                        $id = array_shift($parameters);
                                        if ($id)        {
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)        {