Fix regex dot escape

This commit is contained in:
Maximilian Krög committed 2020-02-21 22:56:53 +01:00
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) {