[OLINGO-1378] does not allow some special characters in search term
This commit is contained in:
parent
6bc0fc72e6
commit
7e1aa94d4e
|
@ -124,7 +124,7 @@ public class SearchTokenizer {
|
||||||
|| isOtherDelimsForWord(character);
|
|| isOtherDelimsForWord(character);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>
|
* <code>
|
||||||
* <b>searchPhrase</b> = quotation-mark 1*qchar-no-AMP-DQUOTE quotation-mark
|
* <b>searchPhrase</b> = quotation-mark 1*qchar-no-AMP-DQUOTE quotation-mark
|
||||||
* <br/><br/>
|
* <br/><br/>
|
||||||
|
@ -218,7 +218,19 @@ public class SearchTokenizer {
|
||||||
|| character == '$'
|
|| character == '$'
|
||||||
|| character == '='
|
|| character == '='
|
||||||
|| character == '%'
|
|| character == '%'
|
||||||
|| character == '\'';
|
|| character == '\''
|
||||||
|
|| character == '&'
|
||||||
|
|| character == '{'
|
||||||
|
|| character == '}'
|
||||||
|
|| character == '['
|
||||||
|
|| character == ']'
|
||||||
|
|| character == ','
|
||||||
|
|| character == '#'
|
||||||
|
|| character == '^'
|
||||||
|
|| character == '|'
|
||||||
|
|| character == '>'
|
||||||
|
|| character == '<'
|
||||||
|
|| character == '`';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -45,7 +45,9 @@ public class SearchTokenizerTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void parseWords() throws Exception {
|
public void parseWords() throws Exception {
|
||||||
assertQuery("C++%20=$@:,*!/?'%27").resultsIn(WORD);
|
assertQuery("C++%20=$@:,*!/?'%27}#^.|").resultsIn(WORD);
|
||||||
|
assertQuery("[]|{`").resultsIn(WORD);
|
||||||
|
assertQuery(">").resultsIn(WORD);
|
||||||
assertQuery("somesimpleword").resultsIn(WORD);
|
assertQuery("somesimpleword").resultsIn(WORD);
|
||||||
assertQuery("anotherWord\u1234").resultsIn(WORD);
|
assertQuery("anotherWord\u1234").resultsIn(WORD);
|
||||||
// special
|
// special
|
||||||
|
|
Loading…
Reference in New Issue