Open sm4522 opened 1 year ago
Good spotting. I found two more cases. An error occurs when a search term is entered with (a) space after the term "foo ", (b) space before the term " foo", and (c) two or more spaces between two terms "foo bar" (the markdown may render my 3 spaces as 1 space).
Ok, stripped the whitespace from the end but is anticipating three spaces incorrectly entered in the search term necessary? If so we should use something like https://pypi.org/project/textnorm/ or some combination of libraries instead of trying to build things from scratch. In the markdown, we use bleachify and markdown doesn't render extra spaces by default. One solution is to add &\nbsp; but right now we are not allowing this. The list of allowed tokens is in term/models
Initial Bug: Search issue with space at the end of a term has been resolved.
Discussion needed on how to normalize searching.
A space at the end of a single term causes an error page to appear when using the search bar. "ablation " is a case.