I want to convert the URL string into an HTML link element (<a href="#"></a>
) (like Facebook make with his URLs in the text by example)
I tried this solution Convert links from a string to clickable links using Ruby/Rails but I just get some HTML link in plain text...
Example :
I have this
string = "blabla http//www.google.com blabla
lorem ipsum lorem ipsum"
And I would this, not in plain text but as HTML element
<p>blabla</p>
<a href="http//www.google.com">http//www.google.com</a>
<p>blabla</p>
<p>lorem ipsum lorem ipsum</p>
Thank you for your help :)