Forum OpenACS Development: Handling quotes or other questionable characters in search query strings

How should the search package handle unmatched quotes or curly braces in a search string.

If you enter a single quote for a search query you will end up with this error:

unmatched open quote in list
while executing
"llength $q"
invoked from within
"set nquery [llength $q]"
("uplevel" body line 82)
invoked from within

This is just the first operation that might fail on a quote. If you enter a curly brace you can see a similar error.

Someday we might support phrase searching by adding double quotes around the query terms, so just throwing away quotes is not a good answer.