Fix regex dot escape
This commit is contained in:
1 parent
ccafb4b91d
commit
b613e8e77f
1 file changed
+1
-1
@@ -12,7 +12,7 @@ $(function () {
|
||||
} catch (e) {
|
||||
}
|
||||
// In case of invalid regexp fall back to non-regexp, but still allow . to match /
|
||||
return makeRe(searchTerm.replace(/\./g, '/').replace(/[.*+?^${}()|[\]\\]/g, '\\$&'));
|
||||
return makeRe(searchTerm.replace(/[.*+?^${}()|[\]\\]/g, '\\$&').replace(/\\\./g, '[./]'));
|
||||
}
|
||||
|
||||
function getWeightFunction(searchTerm, allowRegex) {
|
||||
|
||||
Reference in new issue
Block a user