You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What would you like to be able to do? Can you provide some examples?
If I store some special characters in a column and want to use a filter to search, the search term is not included because of the regexp here. For example in my project I have defined a filter called sender and an email field that I want to search. If I search sender:test it works but then when I do it like sender:[email protected] it does not. Debugging a little I found that line causing the issue.
How could we go about implementing that?
Changing the regexp to allow more symbols like @ and .: /^#{filter}:[\w|@|\.]*$/
Can you think of other approaches to the problem?
It can be simplified as valid_filters&.any? { |filter| word.starts_with?("#{filter}:") }
If you think this approach is fine I can make a PR for it. I monkey patched that class with the first version and its the code I'm currently using.
Regards,
Alejandro
The text was updated successfully, but these errors were encountered:
Thank you for bringing this up 🙂 Something similar (not exactly the same thing) was raised at #2228, but it appears to have gone dormant. If you create PR, I'll be happy to review it.
Hi everyone!
If I store some special characters in a column and want to use a filter to search, the search term is not included because of the regexp here. For example in my project I have defined a filter called
sender
and an email field that I want to search. If I searchsender:test
it works but then when I do it likesender:[email protected]
it does not. Debugging a little I found that line causing the issue.Changing the regexp to allow more symbols like
@
and.
:/^#{filter}:[\w|@|\.]*$/
It can be simplified as
valid_filters&.any? { |filter| word.starts_with?("#{filter}:") }
If you think this approach is fine I can make a PR for it. I monkey patched that class with the first version and its the code I'm currently using.
Regards,
Alejandro
The text was updated successfully, but these errors were encountered: