esamattis / esamattis/underscore.string
trim does not handle dashes
Open
- Dominant language
- JavaScript
- Stars
- 3.4k
- Forks
- 367
- PR merge metrics
- No merged PRs in 30d
Description
ltrim("https://www.lw-qa-3.x.net", "https://www.lw-qa-3.x.net")
blows up with the following error:
SyntaxError: Invalid regular expression: /^[https:\/\/www.lw-qa-3.x.net:80]+/: Range out of order in character class
This is because the function "escapeRegExp" does not escape dashes (-)
Contributor guide
Assessment
This issue has not been assessed yet.