]> git.evergreen-ils.org Git - Evergreen.git/commit
LP#1373601: Consider relevant characters before using word-boundary checks
authorMike Rylander <mrylander@gmail.com>
Tue, 22 Mar 2016 15:50:58 +0000 (11:50 -0400)
committerKathy Lussier <klussier@masslnc.org>
Fri, 1 Apr 2016 20:33:28 +0000 (16:33 -0400)
commitc45e4fbbcbada1592324201ebe84d0b6f0a8cda9
treefe209fe4b10bfcbd2f0c43df45ffb29be27c11a5
parent3ea367dba2b7a2ddada5fa4fe37cdc7a94924874
LP#1373601: Consider relevant characters before using word-boundary checks

To perform unanchored phrase limits, we make sure that the phrase supplied
by the user does not end in the middle of a word by bounding the condition
with word-boundary bracket expresssions.  However, if the phrase starts
or ends with a non-word character (that is, something other than numbers,
letters, or the underscore) then the word-boundary expression won't match.
The effect of this is to cause phrase searches starting or ending in
punctuation to fail when the user would not expect them to.

To address this, we now test the phrase for word-iness at the front and
back before applying word-boundary bracket expressions.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm