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
Fix #2349 better replace for or and and keywords #4707
base: feature
Are you sure you want to change the base?
Conversation
This fix fails in three scenarios:
The solution provided in this comment works in all of those scenarios [edit: for the first, only when the |
it should use |
Same with current one
Same with current one
OK Personally i use on my forum because current solution broke more times. I check with regexp. Simple issue open on 2016 … still exist 7 years after, Let Me Laugh … |
Like before : trim remove space
Like current
Fixed
Done |
You're right - I'd missed that. Arguably, as @RevertIT suggests, that
Untested but LGTM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to work when searching for "andy", it finds the following thread titles :
Tempore technologia paternoster tandy
Andyravida technologia tristique urna nullandy
Computandytor quis viverra ipsum venenatis
When searching for "ORAS", it finds the following thread titles :
ORAS, Pokemon nunc risus aliquam risus
Eget continentes pellentesque cinque ORAS
Andyravida technoloRASgia tristique urna nullandy
Before the patch the same search resulted in the "minimum length" error.
We appreciate your contribution !
@Sama34 Try searching with quotes |
It's for user entered data when search, a simple trim for spaced added by copy/paste : i really don't think need more. |
Well, it's actually needed, trim doesn't trim Output: Trim blank character
string(19) " f "
Trim blank character via chrs function
string(1) "f"
Trim normal space
string(1) "f" |
This fix one issue, and not another one. |
Searching for the following yields the same (positive) results as my previous post :
Searching for the following yields a Sorry, but no results were returned ... error result:
I stopped testing after all these terms. My environment is:
|
I really think it's totally unrelated to this issue … Did you compare with current ? Dis you compare with "toty" or 'toty" etc ? |
Doesn't change the fact it's better to implement now than forget down the road if the native function exits. |
Yeah, given that it's got a benefit (handling more cases of whitespace), the question seems to be "Is there any reason not to?" The only potentially legit one I can think of is "It's less performant", but given that this isn't performance-critical code, and the performance impact is anyway very small, that doesn't seem to be an actually legit reason. So, I'm in favour of the change, but also fine with it being achieved via a separate issue+PR. My 2c. |
I agree. @BettyIsBoop please could you edit your PR to cover all? Thx! I hope this will be merged into 1.8.35 :) |
Can none of the listed entities be part of a valid search phrase (perhaps in other languages/scripts)? If there are no known issues, we can keep using the inbuilt functions - if there's a problem, these can be replaced across the application later. |
Done |
Resolves #2349