[OLINGO-1378] does not allow some special characters in search term
This commit is contained in:
parent
6bc0fc72e6
commit
7e1aa94d4e
|
@ -123,8 +123,8 @@ public class SearchTokenizer {
|
|||
|| isUnreserved(character)
|
||||
|| isOtherDelimsForWord(character);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* <code>
|
||||
* <b>searchPhrase</b> = quotation-mark 1*qchar-no-AMP-DQUOTE quotation-mark
|
||||
* <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 == '`';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -45,7 +45,9 @@ public class SearchTokenizerTest {
|
|||
|
||||
@Test
|
||||
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("anotherWord\u1234").resultsIn(WORD);
|
||||
// special
|
||||
|
|
Loading…
Reference in New Issue