diff options
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/gitblit/tickets/TicketIndexer.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/com/gitblit/tickets/TicketIndexer.java b/src/main/java/com/gitblit/tickets/TicketIndexer.java index 98fe6977..11ea3a73 100644 --- a/src/main/java/com/gitblit/tickets/TicketIndexer.java +++ b/src/main/java/com/gitblit/tickets/TicketIndexer.java @@ -143,8 +143,10 @@ public class TicketIndexer { private String escape(String value) { if (value.charAt(0) != '"') { - if (value.indexOf('/') > -1 || value.indexOf('-') > -1) { - return "\"" + value + "\""; + for (char c : value.toCharArray()) { + if (!Character.isLetterOrDigit(c)) { + return "\"" + value + "\""; + } } } return value; |