[BUGFIX] Add missing space in regular expression 94/55694/5
authorWolfgang Klinger <wolfgang@wazum.com>
Tue, 13 Feb 2018 07:12:54 +0000 (08:12 +0100)
committerFrank Naegler <frank.naegler@typo3.org>
Tue, 13 Feb 2018 12:22:18 +0000 (13:22 +0100)
DataHandler::clearPrefixFromValue is missing a space
in the regular expression when removing the prependAtCopy
label. That leads to wrong headers in copied elements.

Releases: master
Resolves: #83870
Change-Id: I49cde9a9a20686715d9b042173f89bfeb2bd112f
Reviewed-on: https://review.typo3.org/55694
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/core/Classes/DataHandling/DataHandler.php

index 0783038..73ef168 100644 (file)
@@ -8254,7 +8254,7 @@ class DataHandler implements LoggerAwareInterface
      */
     public function clearPrefixFromValue($table, $value)
     {
-        $regex = '/' . sprintf(quotemeta($this->prependLabel($table)), '[0-9]*') . '$/';
+        $regex = '/\s' . sprintf(preg_quote($this->prependLabel($table)), '[0-9]*') . '$/';
         return @preg_replace($regex, '', $value);
     }