Jasper Floor pushed to branch bugfix/HSTTWO-3805 at cms-community / hippo-site-toolkit
Commits: 6348c697 by Jasper Floor at 2016-09-22T17:18:05+02:00 HSTTWO-3805 ignore \ in search - - - - - 1 changed file: - content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java Changes: ===================================== content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java ===================================== --- a/content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java +++ b/content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java @@ -217,6 +217,8 @@ public final class SearchInputParsingUtils { } // else we remove the ~ , !, - } + } if (c == '\\') { + //seems to have no affect including this except it breaks on a single \ } else if (sb.length() > 0) { // if one wildcard is allowed, it will be added but never as leading // also if the wildcard is found after a special char (like '!', '-', '&', ' ' etc, it will be skipped as well) @@ -268,7 +270,7 @@ public final class SearchInputParsingUtils { public static boolean isSpecialChar(final char c) { return c == '(' || c == ')' || c == '^' || c == '[' || c == ']' || c == '{' || c == '}' || c == '~' || c == '*' || c == '?' || c == '|' || c == '&' - || c == '!' || c == '-' || c == '\"' || c == '\'' || c == ' '; + || c == '!' || c == '-' || c == '\"' || c == '\'' || c == ' ' || c == '\\'; } /** View it on GitLab: https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/6348c697b25552ad3f473071f42476011d092d92
_______________________________________________ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn