[BUGFIX] Highlight keywords containing utf-8 characters in pagetree search 67/49667/2
authorTymoteusz Motylewski <t.motylewski@gmail.com>
Tue, 30 Aug 2016 20:58:55 +0000 (22:58 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Wed, 31 Aug 2016 15:09:23 +0000 (17:09 +0200)
Adds a 'u' switch to preg_replace

Resolves: #39979
Releases: 7.6, master
Change-Id: I3c23f60a7bc157b9647d053492ce1bd226296dc8
Reviewed-on: https://review.typo3.org/49667
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Philipp Gampe <philipp.gampe@typo3.org>
Tested-by: Philipp Gampe <philipp.gampe@typo3.org>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/backend/Classes/Tree/Pagetree/DataProvider.php

index 456d936..25216c2 100644 (file)
@@ -297,7 +297,7 @@ class DataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider
                     if ($isNumericSearchFilter && (int)$rootlineElement['uid'] === (int)$searchFilter) {
                         $text = str_replace('$1', $refNode->getText(), $replacement);
                     } else {
-                        $text = preg_replace('/(' . $searchFilterQuoted . ')/i', $replacement, $refNode->getText());
+                        $text = preg_replace('/(' . $searchFilterQuoted . ')/iu', $replacement, $refNode->getText());
                     }
                     $refNode->setText($text, $refNode->getTextSourceField(), $refNode->getPrefix(), $refNode->getSuffix());
                     /** @var $childCollection \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNodeCollection */