What method is used by Discourse to identify urls in post body and make it clickable?. I tried going through the codebase. But still no luck.
The above is used for client, are there any similar ways for ruby on rails ?
It actually also uses
I could be wrong, AFAIK the
PrettyText module is used to cook raw content into markdown: it essentially utilizes
I guess you want to extract all the links inside the post for the feature Preventing malicious linking. You can get it simply by
doc.css("a[href]") using Nokogiri module.