Closed lguariento closed 2 years ago
I assume you propose that we escape any special character from searches. Followign exceptions could be useful (even used)
"this is my search term"
*
?
Do you know of a way of escaping them other than JavaScript? How I'd do it is by adding something like 'on submit, look for these characters and add a \ before them'.
document.getElementById("search_button").addEventListener('click', function () {
let text = document.getElementById('search_field_id').value;
let regex = /:/gi; <- the regex. In this case I am escaping the semicolon
let new_text = text.replaceAll(regex, "\\:");
document.getElementById('search_field_id').value = new_text;
});
The special characters in the search term should be escaped on the server (in xquery).
Can you dig up where is the search query is being sent to?
Actually this issue is about the /documentation repository rather than this, I think.
Yep, I agree. And it will then also be fixed for both.
Closing this and opening this.
When the input search string contains a parenthesis Lucene interprets it as an unescaped special character. For instance, searching for test) or httpclient() .