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

Correctly detect filters with non-word params #2260

Merged
merged 2 commits into from
Oct 6, 2022

Conversation

cattekin
Copy link
Contributor

@cattekin cattekin commented Sep 8, 2022

Change the filter regex to return valid filter matches when the filter attribute isn't an ascii word object.

This fixes #2228 as well as allowing using comma separated values when filtering

It shouldn't matter when checking for the existence of a filter whether the characters to the right of the : in the word object contain things like unicode characters or punctuation.

Change the filter regex to return valid filter matches when the filter
attribute isn't an ascii word object.
@jubilee2
Copy link
Contributor

jubilee2 commented Sep 20, 2022

can you explain more? I do not see related between this and #2252

@cattekin
Copy link
Contributor Author

can you explain more? I do not see related between this and #2252

sorry, somehow messed up the pasting the issue, the correct one is #2228

lib/administrate/search.rb Outdated Show resolved Hide resolved
Only check the part of the section before `:` for valid filters

Co-authored-by: Pablo Brasero <[email protected]>
@pablobm
Copy link
Collaborator

pablobm commented Oct 6, 2022

Looks good. Thank you!

@pablobm pablobm merged commit 6467a96 into thoughtbot:main Oct 6, 2022
@cattekin cattekin deleted the search_filters branch October 6, 2022 15:30
@jubilee2
Copy link
Contributor

jubilee2 commented Oct 9, 2022

it's should fixed for #2265

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve filter regex
3 participants