Open michaelhidalgo opened 11 years ago
yes, we should trim the submitted text
note: The search is current a string search on both code and html (unless the title: prefix is used)
One area to improve the search would be to add something like http://lucenenet.apache.org/ to it
For reference the search code is at https://github.com/TeamMentor/Master/blob/3_3_Release/Web%20Applications/TeamMentor.CoreLib/TM_AppCode/XmlDatabase/TM_Xml_Database.Library.GuidanceItem.cs#L58 (which could do with a refactoring a clean up , since it still has the old RegEx code commented out)
Considering that there exist an article titled "Assume All Input Is Malicious", then if you enter this text in the search box, we got results back:
BUT, if you enter the same text and you enter a white space at the end, the search fails (note that I'm using the same text pattern).
This issue could be addressed by using the TrimEnd to remove the trailing ocurrences of whitespaces.