-
Notifications
You must be signed in to change notification settings - Fork 2
Description
I'm having trouble figuring out a way to sanitize user-provided query string that is used in context of the advanced text search operator. The general guideline is that $sanitizer->selectorValue() should be used (and it does, or there's a risk that the query may contain something potentially harmful, or at least "surprising"), yet I haven't found a clean way to make a query such as +"foo bar"
or -"foo bar"
survive this.
Is this an issue, something that hasn't been implemented (yet?), or perhaps a special case that should be handled in some other way?
I can kind of get this to work if I call selectorValue() with options 'useQuotes' => false, 'version' => 1
and wrap the query string in double quotes, but it seems potentially problematic to rely on V1 (there's no info if this is a permanent option or something that may be deprecated later on), and I'd prefer to avoid custom quote handling.