We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When autoEscape is set to true and (at least) one of the elements in searchWords array is regex, the following exception is raised:
autoEscape
searchWords
TypeError str.replace is not a function
Example: https://codesandbox.io/s/20p3zk380n
The text was updated successfully, but these errors were encountered:
The autoEscape parameter is meant to escape sensitive characters before converting a string to a regex. It's not meant to work with regexes.
I guess this is a bug, but I don't plan on fixing it. I'd be happy to review a PR though.
Sorry, something went wrong.
Suggestion: Check instanceof RegExp for each searchWords value in the autoescape function and don't escape if it is RegExp.
instanceof RegExp
No branches or pull requests
When
autoEscape
is set to true and (at least) one of the elements insearchWords
array is regex, the following exception is raised:Example: https://codesandbox.io/s/20p3zk380n
The text was updated successfully, but these errors were encountered: