Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Escape regex metacharcters when constructing search term RegExp from … #52

Merged
merged 1 commit into from
Feb 12, 2017
Merged

Escape regex metacharcters when constructing search term RegExp from … #52

merged 1 commit into from
Feb 12, 2017

Conversation

ahutchings
Copy link
Contributor

@ahutchings ahutchings commented Feb 12, 2017

…user input

Without escaping, user input such as "[" or "*" trigger an uncaught SyntaxError: "Invalid regular expression: /^(?:.* +)*[/: Unterminated character class"

…user input

Without escaping, user input such as "[" or "*" trigger an uncaught SyntaxError: "Invalid regular expression: /^(?:.* +)*[/: Unterminated character class"
@tommoor tommoor merged commit ea5263b into tommoor:master Feb 12, 2017
@tommoor
Copy link
Owner

tommoor commented Feb 12, 2017

Killing it, btw I just switched to using prettier to auto format the code - does away with opinions which is great on OS projects like this :) Just wanted to let you know incase you do any more PR's master was just linted and updated with that formatting which changed a bunch of files.

@ahutchings ahutchings deleted the bugfix/escape-regexp branch February 13, 2017 00:20
@ahutchings
Copy link
Contributor Author

Nice, I've been meaning to check out prettier. Will definitely update before sending any PR's!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants