File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
internal/ogc/features_search Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,9 @@ const (
2525var (
2626 deepObjectParamRegex = regexp .MustCompile (`\w+\[\w+\]` )
2727
28- // matches & (AND), | (OR), ! (NOT), and <-> (FOLLOWED BY).
28+ // matches `&` (AND), `|` (OR), `!` (NOT), and ` <->` (FOLLOWED BY).
2929 searchOperatorsRegex = regexp .MustCompile (`&|\||!|<->` )
30- // matches ' (apostrophe), ( (left parenthesis), and ) (right parenthesis).
30+ // matches `'` (apostrophe), `(` (left parenthesis), and `)` (right parenthesis).
3131 searchDiscardCharactersRegex = regexp .MustCompile (`'|\(|\)` )
3232
3333 searchKnownParams = map [string ]struct {}{
@@ -90,7 +90,7 @@ func parseCollections(query url.Values) (d.CollectionsWithParams, error) {
9090}
9191
9292func parseSearchTerms (query url.Values ) (string , error ) {
93- searchTerms := searchDiscardCharactersRegex .ReplaceAllLiteralString (strings .TrimSpace (strings .ToLower (query .Get (queryParam ))), "" )
93+ searchTerms := searchDiscardCharactersRegex .ReplaceAllLiteralString (strings .TrimSpace (strings .ToLower (query .Get (queryParam ))), " " )
9494 if searchTerms == "" {
9595 return "" , fmt .Errorf ("no search terms provided, '%s' query parameter is required" , queryParam )
9696 }
You can’t perform that action at this time.
0 commit comments