Auto Convert URL/domain to Hyper-Links?

Project:ProjectPier
Version:0.8.5.0-Beta1
Component:Code
Category:feature request
Priority:normal
Assigned:perry.trinier
Status:closed - fixed
Description

Wondering if you can add the code to filter & Auto-Convert the URL/domain to clickable hyper-links in the content?

#1

Textile is available, using the simple markup might be of use.

#2

While I use this, I don't think its appropriate to have all of my rather non-technical clients learn Textile just to create links for my convenience..

I'm looking into this in my spare time, I'll post information as I have it.

Rueben

#3
Assigned to:Visitor» perry.trinier
Status:new» open - assigned
#4
Status:open - assigned» patch - code needs review

I added a quick search and replace to the do_textile function which does the auto-linking. A few bugs I can see so far:

  • Punctuation at the end of a URL (for example if it is at the end of a a sentence) will be included as part of the link e.g. http://www.reddit.com. This will break some links, I think depending on the DNS configuration of the site in question. My workaround for now is to add a space after the URL.
  • It won't work with URLs that contain spaces.
AttachmentSize
do_textile-with-autolinking.patch 139.41 KB
#5

Code accepted into 0.8.6. Places in new function add_links in general.php so we can reuse the code in various places, e.g. task list. Works great.

#6
Version:0.8.0.3» 0.8.5.0-Beta1
Status:patch - code needs review» closed - fixed

Accepted in 0.8.6 (closed now)