]> 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:28:02 +0000 (16:28 -0400)
commite7c87854def261efbe39057c98b8a1a5494bc320
treee4da833636e82f7c0146657290befe78ee43c520
parenteadd9458856920bf4e2a6972e5b572a7fae69b57
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