bootstrap
bootstrap copied to clipboard
Typeahead RegEx Escaping
The typeahead widget will break when the input text contains characters required for regex matching (highlighting). Here is a code snippet for the escape function.
// Escapes regex characters RegExp.escape = function(text) { return text.replace(/[-[]{}()*+?.,^$|#\s]/g, "$&"); };
this is fixed in 2.0.3 - thanks!