What’s the easiest way to linkify urls in a string? Eg. wrapping www.google.com
or google.com
in <a href="">
1 Like
Check this out: https://atmospherejs.com/konecty/autolinker
It is actually a wrapper around Autolinker.js which allows you to take any string input, automatically find and wrap links with anchor tags.
4 Likes
another case of solving a problem i didn’t know existed, cheers!
1 Like
When you’re using this package, make sure you sanitize your input because it leaves you open to XSS injections
1 Like