Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Strip non-alpha numeric or whitespace chars out of search query #205
This morning, in production, we had an issue where requests were timing out. After consulting New Relic, it looks like the app errored when a user submitted a couple search terms that included parentheses.
This pull requests makes it so that, when users search using the default setting, "Contains words", non-query-friendly characters are stripped out of the query, leaving just alphanumeric characters and whitespaces.
This tests that things don't explode, which is good. It'd be a little better if there was an explicit test on the transformation in
As we discussed, this can be alleviated by removing the
@cmc333333 Agreed. I wanted to think it through more before deviating from the patterns established in the tests.
I'm looking at the need to use