[Small Bug] Filter of Admin Panel listing component
cannot hit when field value contains \
#39513
Open
Description
Preconditions and environment
- Magento 2.4.7
- Filter of Admin Panel
listing component
cannot hit when field value contains\
- When filter is text input and
LIKE
condition
Steps to reproduce
This is only an example for "CMS Page", but it occurs on all listing component
- Go to Admin Panel
Content > Elements > Pages
- Create a page with title
Magento Store
- Go back to grid and click
Filters
button to search title withMagento Store
Result 1: Hit
- Create a page with title
Magento\Store
- Go back to grid and click
Filters
button to search title withMagento\Store
Result 2: Not Hit (Unexpected)
Expected result
Result 1 & 2 both Hit.
Actual result
Result 2 is Not Hit
Additional information
The UI Component
filter cannot deal with \
.
Reason is in this line(Input.php#L77).
$value = str_replace(['%', '_'], ['\%', '\_'], $value);
should be
$value = str_replace(['\\', '%', '_'], ['\\\\', '\%', '\_'], $value);
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.