Problem/Motivation
Whitespaces at the beginning or end of text entered into an exposed filter return no results.
Steps to reproduce
Example: If you have something with "foo" and you filter for "foo" you'll get the result. But, if you filter for "foo " (with a space at the end), you'll get no result.
Proposed resolution
trim the entered text before passing to query.
Issue fork drupal-3443428
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #6
joewhitsittProvided an MR with a test that I believe resolves this issue without causing issues for other views filtering situations.
Comment #8
smustgrave commentedVery nice work!
Left 1 comment on the MR around the test coverage.
Comment #9
joewhitsittComment #10
smustgrave commentedBelieve feedback has been addressed for this one.
Comment #11
xjmComment #12
xjmI tested manually with the following steps. (Remember to document manual testing, everyone!)
main.test. The test article is listed in the results as expected.test(with trailing space). No results.Comment #13
xjmResults from the test-only job:
👍
Comment #14
xjmI asked myself whether this bugfix was patch-safe.
It introduces:
Comment #17
xjmCommitted to
mainand11.xas a slightly disruptive bugfix. Thanks everyone!