Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter by text field with "&" symbol doesn't work #20271

Open
amazhukin opened this issue May 7, 2024 · 0 comments
Open

Filter by text field with "&" symbol doesn't work #20271

amazhukin opened this issue May 7, 2024 · 0 comments
Assignees
Labels
issue: bug Issue reporting a bug severity: low If the issue only affects a very niche base of users and an easily implemented workaround can solve source: core:content-manager Source is core/content-manager package status: pending reproduction Waiting for free time to reproduce the issue, or more information

Comments

@amazhukin
Copy link

Bug report

Required System information

  • Node.js version: 18.20.2
  • Yarn version: 1.22.22
  • Strapi version: v4.24.1
  • Database: postgres
  • Operating system: darwin-arm64
  • Is your project Javascript or Typescript: Javascript

Describe the bug

Filter by text field with "&" symbol doesn't work. Search string is cut up to & symbol and no results with "is" operand

Steps to reproduce the behavior

  1. Create any entity at collection type that text field contains ampersand (&) symbol.
    Eg, create article with title "Test article & issue reproduce"
    image
  2. Go to list of collection type and using "Filters" button select text field, "is" operand and text with & symbol
    image
  3. Click "Add filter"
  4. Check what filter is applied
    image

Expected behavior

Filter should be applied correctly and display found record, like if there are no & symbol in search:
image

Additional context

Some details from network tab:
Request URL:
http://127.0.0.1:1337/content-manager/collection-types/api::article.article?page=1&pageSize=10&sort=title:ASC&filters[$and][0][title][$eq]=Test%20article%20&%20issue%20reproduce=
Query parameters that applied:

page: 1
pageSize: 10
sort: title:ASC
filters[$and][0][title][$eq]: Test article 
 issue reproduce: 

image

@joshuaellis joshuaellis added issue: bug Issue reporting a bug severity: low If the issue only affects a very niche base of users and an easily implemented workaround can solve source: core:content-manager Source is core/content-manager package status: pending reproduction Waiting for free time to reproduce the issue, or more information labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Issue reporting a bug severity: low If the issue only affects a very niche base of users and an easily implemented workaround can solve source: core:content-manager Source is core/content-manager package status: pending reproduction Waiting for free time to reproduce the issue, or more information
Projects
Status: To be reviewed
Status: To review
Development

No branches or pull requests

3 participants