Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

DATASOLR-279 - Escape forward slash character #790

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,7 @@ public void remove() {
* {@link BasePredicateProcessor#doProcess(Predicate, Field, Class)}
*
* @author Christoph Strobl
* @author Rodrigo Vizbelis
*/
abstract class BasePredicateProcessor implements PredicateProcessor {

Expand All @@ -655,9 +656,9 @@ abstract class BasePredicateProcessor implements PredicateProcessor {
protected final Set<String> BOOLEAN_OPERATORS = new HashSet<>(Arrays.asList("NOT", "AND", "OR"));

protected final String[] RESERVED_CHARS = { DOUBLEQUOTE, "+", "-", "&&", "||", "!", "(", ")", "{", "}", "[", "]",
"^", "~", "*", "?", ":", "\\" };
"^", "~", "*", "?", ":", "\\", "/" };
protected String[] RESERVED_CHARS_REPLACEMENT = { "\\" + DOUBLEQUOTE, "\\+", "\\-", "\\&\\&", "\\|\\|", "\\!",
"\\(", "\\)", "\\{", "\\}", "\\[", "\\]", "\\^", "\\~", "\\*", "\\?", "\\:", "\\\\" };
"\\(", "\\)", "\\{", "\\}", "\\[", "\\]", "\\^", "\\~", "\\*", "\\?", "\\:", "\\\\", "\\/" };

@Override
public Object process(@Nullable Predicate predicate, @Nullable Field field, @Nullable Class<?> domainType) {
Expand Down