completeValue.append(",");\r
else \r
first=false; \r
- completeValue.append(pz2escape(expr.toString()));\r
+ completeValue.append(expr.toString());\r
logger.trace("valueWithExpressions so far: [" + completeValue + "]");\r
}\r
return completeValue.toString(); \r
package com.indexdata.mkjsf.pazpar2.commands;\r
\r
-import java.util.ArrayList;\r
import java.util.Arrays;\r
import java.util.List;\r
-import java.util.StringTokenizer;\r
\r
import javax.enterprise.context.SessionScoped;\r
import javax.inject.Named;\r
*/ \r
public void setFilter(String compoundExpression) {\r
if (compoundExpression != null && compoundExpression.length()>0) {\r
- String[] subExpressions = compoundExpression.split(",");\r
+ // Split expression by commas that are not escaped (with backslash)\r
+ String[] subExpressions = compoundExpression.split("(?<!\\\\),");\r
for (int i=0; i<subExpressions.length; i++) {\r
if (subExpressions[i].split("[=~]").length==1) {\r
removeFilters(subExpressions[i].split("[=~]")[0]);\r
*/ \r
public void setLimit (String compoundExpression) { \r
if (compoundExpression != null && compoundExpression.length()>0) {\r
- String[] subExpressions = compoundExpression.split(",");\r
+ // Split expression by commas that are not escaped (with backslash)\r
+ String[] subExpressions = compoundExpression.split("(?<!\\\\),");\r
for (int i=0; i<subExpressions.length; i++) {\r
if (subExpressions[i].split("[=~]").length==1) {\r
removeLimits(subExpressions[i].split("[=~]")[0]);\r