Skip to content

[Small Bug] Filter of Admin Panel listing component cannot hit when field value contains \ #39513

Open
@wubinworks

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

  1. Go to Admin Panel Content > Elements > Pages
  2. Create a page with title Magento Store
  3. Go back to grid and click Filters button to search title with Magento Store

Result 1: Hit

  1. Create a page with title Magento\Store
  2. Go back to grid and click Filters button to search title with Magento\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”.

Metadata

Assignees

Labels

Area: ContentComponent: AdminIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Reported on 2.4.7Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions