]> source.dussan.org Git - gitblit.git/commitdiff
Escape Lucene query values with hyphens 15/115/1
authorJames Moger <james.moger@gitblit.com>
Fri, 27 Jun 2014 18:59:34 +0000 (14:59 -0400)
committerJames Moger <james.moger@gitblit.com>
Fri, 27 Jun 2014 18:59:34 +0000 (14:59 -0400)
src/main/java/com/gitblit/tickets/TicketIndexer.java

index 3929a00056d03211b397878ba2ca9446d67d457c..98fe69776fd2be2c0d53db69f1251226a30f997a 100644 (file)
@@ -143,7 +143,7 @@ public class TicketIndexer {
 
                private String escape(String value) {
                        if (value.charAt(0) != '"') {
-                               if (value.indexOf('/') > -1) {
+                               if (value.indexOf('/') > -1 || value.indexOf('-') > -1) {
                                        return "\"" + value + "\"";
                                }
                        }