H
H
hbrmdc2015-10-27 18:40:49
JavaScript
hbrmdc, 2015-10-27 18:40:49

How to format url inside text using js?

here is the string:
"RT @EarthPicturz: In the mountains of Montana. https://t.co/WH42FLFm4B "
I need the js function to recognize the url when rendering this string and enclose it in an html < a > tag
how to do this, or what is the name of the process in Russian or in English? "parse url from string"?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Ineshin, 2015-10-27
@hbrmdc

Linkify))
There is even a plugin like this: https://github.com/cowboy/javascript-linkify

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question