Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Linkifying URLs in plain text

by eye (Chaplain)
on Nov 22, 2008 at 08:23 UTC ( [id://725307]=note: print w/replies, xml ) Need Help??


in reply to Linkifying URLs in plain text

Bonus points for converting the first link (http://www.example.com) to http://www.example.com/ in the HREF (add the omitted slash).
Be cautious of mechanically adding a trailing slash to a "directory" name. While doing this is usually desirable, there are some exceptions. As an example, Google's linux search page does not like this:
 
    http://www.google.com/linux -> linux specific search page
    http://www.google.com/linux/ -> 404 error

I'm not aware of any site where it is a problem to add a trailing slash to a domain name, but it's only a matter of time before someone finds a new way to be too clever for their own good.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://725307]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-04-24 03:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found