File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
lib/internal/Magento/Framework/View/Element/UiComponent/DataProvider Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 16
16
class FulltextFilter implements FilterApplierInterface
17
17
{
18
18
/**
19
- * Patterns using in preg_replace for emails
19
+ * Patterns using in preg_replace
20
20
*/
21
- private const EMAIL_REPLACE_PATTERNS = ['/@/ ' , '/\./ ' ];
21
+ private $ patterns = [
22
+ '/[@\.]/ ' => '\_ ' ,
23
+ '/([+\-><\(\)~*]+)/ ' => ' ' ,
24
+ ];
22
25
23
26
/**
24
27
* Returns list of columns from fulltext index (doesn't support more then one FTI per table)
@@ -75,8 +78,7 @@ function ($column) use ($alias) {
75
78
*/
76
79
private function escapeAgainstValue (string $ value ): string
77
80
{
78
- $ value = preg_replace ('/([+\-><\(\)~*]+)/ ' , ' ' , $ value );
79
- return preg_replace (self ::EMAIL_REPLACE_PATTERNS , '\_ ' , $ value );
81
+ return preg_replace (array_keys ($ this ->patterns ), array_values ($ this ->patterns ), $ value );
80
82
}
81
83
82
84
/**
You can’t perform that action at this time.
0 commit comments