This problem was first surfaced in [[ https://logstash.wikimedia.org/goto/1fee96f80e843fae8f3a7e80cc2ea724 | Logstash ]].
The AutocompleteLookupHandler mixin includes a number of regular expressions and calls to string-processing methods. Something in here is breaking when `"` characters are entered into the search field.
**Steps to Reproduce: **
* Go to Special:MediaSearch and enter a search term that is wrapped in quotes (single or multiple words, does not matter).
**Actual Results:**
* The autocomplete results fail to display
* Warnings and/or errors appear in the JS console, including:
`Uncaught TypeError: trimmedInput.match(...) is null` and
`jQuery.Deferred exception: result.match(...) is null`
Expected Results:
* Search terms containing quotes should display auto-complete results normally
On a related note, I'm noticing search results differ when quotes are present even when the search term is only a single word: `"dog"` vs `dog` will produce different results. This happens regardless of whether JS is enabled or not. What is considered "correct" behavior here?