Follow-up to bug #10231: Fixed wrong pattern conversions from split() to preg_split()
authorOliver Hader <oliver.hader@typo3.org>
Mon, 8 Jun 2009 15:20:28 +0000 (15:20 +0000)
committerOliver Hader <oliver.hader@typo3.org>
Mon, 8 Jun 2009 15:20:28 +0000 (15:20 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5574 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_htmlmail.php
t3lib/class.t3lib_matchcondition.php
typo3/sysext/cms/tslib/class.tslib_content.php
typo3/sysext/cms/tslib/class.tslib_fe.php

index 1bdc468..d1e9087 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
 
        * Fixed bug #11033: Optimize hook to indexed_search that checks for a running crawler task
        * Fixed bug #11268: Optimize initialization of frontend editing
+       * Follow-up to bug #10231: Fixed wrong pattern conversions from split() to preg_split() 
 
 2009-06-08  Steffen Kamper  <info@sk-typo3.de>
 
index 73799f9..0830f64 100644 (file)
@@ -989,7 +989,7 @@ class t3lib_htmlmail {
                }
 
                        // fixes javascript rollovers
-               $codepieces = preg_split('/' . quotemeta(".src") . '/', $html_code);
+               $codepieces = explode('.src', $html_code);
                $pieces = count($codepieces);
                $expr = '/^[^'.quotemeta('"').quotemeta("'").']*/';
                for($i = 1; $i < $pieces; $i++) {
index 8278e7d..03b1ed7 100644 (file)
@@ -361,7 +361,7 @@ class t3lib_matchCondition {
                                return t3lib_div::compat_version($value);
                        break;
                        case 'userFunc':
-                               $values = preg_split('/[\(\)]/', $value);
+                               $values = preg_split('/\(|\)/', $value);
                                $funcName = trim($values[0]);
                                $funcValue = t3lib_div::trimExplode(',', $values[1]);
                                $pre = $GLOBALS['TSFE']->TYPO3_CONF_VARS['FE']['userFuncClassPrefix'];
index ea2e828..74fd89a 100644 (file)
@@ -3151,7 +3151,7 @@ class tslib_cObj {
                                        // traverse keys and quote them for reg ex.
                                reset($aKeys);
                                while(list($tK,$tV)=each($aKeys))       {
-                                       $aKeys[$tK]=quotemeta($tV);
+                                       $aKeys[$tK] = preg_quote($tV, '/');
                                }
                                $regex = '/' . implode('|', $aKeys) . '/';
                                        // Doing regex's
index fa560ad..78eefe9 100644 (file)
                        $res = t3lib_div::getURL($code, 1, $headerArr);
 
                                // Header and content are separated by an empty line
-                       list($header, $content) = preg_split("/[\r\n\r\n]/", $res, 2);
+                       list($header, $content) = explode("\r\n\r\n", $res, 2);
                        $content.= "\r\n";
 
                        if (false === $res) {