Closed emanuelwo closed 3 years ago
the matching results for this string are wrong
const text = "<div><a href="https://www.test.com/">https://www.test.com/</a></div>" text.match(urlRegexSafe());
["https://www.test.com/", "https://www.test.com/</a></div>"]
You need to parse and striptags (in advance), like we did in @spamscanner.
Here's an example snippet from that codebase:
https://github.com/spamscanner/spamscanner/blob/1f5645f1a9b53eb3e6fae340e0353b1348f54459/index.js#L954-L963
the matching results for this string are wrong
["https://www.test.com/", "https://www.test.com/</a></div>"]