how can we remove white space auto when we copy paste words in search bar?
Hi i want to remove white space automatically as its causing problems while searching and copy pasting
10 Replies
@Answer Overflow
You want to remove all whitespace, or just trim the start/end?
@pboivin thanks for your time just want to trim white space
They should be auto trimmed by default if I rememebr correctly.
Yeah, pretty sure it works the same in v2 and v3. The whitespace at the start/end is trimmed, and the words are combined to form an "and" query.
So if you search for " one two ", it should return the results that contain the words "one" and "two".
@aliabbas8356 Can you explain the issue you're having? What exactly are you pasting in the search bar, can you give an example?
@pboivinI understand my problem i have entered a space inside product name like i have product named as Mobile1 and i entered like space Mobile1 in database i thinks thats why my results are not showing when i use search is there ia any way to sensitize the data before save to database using TextInput.
What database are you using?
@pboivin mysql
Ok. Well are you sure it's a regular space you're using? Could it be a non-breaking space maybe?
@pboivin thanks for you reply