Last modified: 2010-07-15 19:59:00 UTC
"When I search for certain items, it seems that the search bar brings up strange results. For instance, searching "Doctor Who (" turns the "(" into an "a" ([http://i712.photobucket.com/albums/ww122/fifteenstep/wikisearchproblem.png an example here in this segment of a screen cap]) and a search for "Doctor Who h" turns the "h" into an ":" (i'm using Doctor Who examples because that's what I was indeed looking for when I discovered this). I get the bug with other searches (like, "Star Trek o") or when I search for a single word and a space (like "Star " turns "Starting Pitcher" into "Star ing Pitcher" and "Starbucks" into "Star ucks" and "Life " turns "Life Imprisonment" into "Lifebimprisonment"). In fact, I just noticed this now, but searching for "life" then two spaces turns the searches into "Lifebo+(rest of search result phrase beginning with "Life"), three spaces turns the search to "Lifeboa+(rest of search result phrase beginning with "Life"), eg "Lifeboaimprisonment", and so on until "Life+17 spaces" full reveals "Lifeboat (shipboard)" over the search results. I get the same thing if I search words like "time", "star", "rose" and "royal" and a bunch of spaces or any spaces (even sometimes one)." This is confirmed with Internet Explorer 6 and 7, Firefox 3.3.6 and 3.3.7. Proactively assigning this to adam, who implemented this as far as I know.
Oh important note, the isssue does NOT show in Chrome/Safari.
It seems to me (I don't know the code) that the search engine ignores some characters, for example leading and following spaces and brackets. But the highlighting doesn't do so. Example (dewiki): If you enter " sinus ", you get Sinus cnd Kosinus Sinus cis [...] Sinus caroticus Sinus cavernosus instead of Sinus und Kosinus Sinusitis [...] Sinus caroticus Sinus cavernosus If you add an additional space, every suggestion starts with "Sinus cav". So I think, the highlighting in Javascript (it isn't in the Ajax-answer) takes the number of charakters of the search input and uses so much characters of the last suggestion and puts them bold in front of the results. And this isn't a browser issue: It is also wrong in Chrome and Opera (I didn't test safari, but think it is the same there). This error only occurs in Vector-Skin, because in Monobook, the results are not highlighted bold. Trimming the same Characters at the back and front in the Javascript function which are trimmed in the search engine should resolve this issue.
An other issue (IE8, FF3.6): Searching for "rev" on dewiki: * REVolution * ... * REVolver * REV The highlighting has the upper case from the last entry for all entries. Same for "mac".
*** This bug has been marked as a duplicate of bug 24237 ***