program homepage field isn't tolerant of URLs lacking http:

joachim - March 3, 2008 - 22:22
Project:Station
Version:5.x-2.x-dev
Component:Programs
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

My users are entering URLs like 'www.myspace.com/username'.
This gets rendered as a local path, causing page not found errors on the site and a broken link.

#1

drewish - March 25, 2008 - 08:05
Category:bug report» feature request

it's documented on the form

If you provide a link, it needs to begin with http:// or you will get a link to a page on this site.

so it's not a bug making this a feature request ;)

#2

joachim - March 25, 2008 - 08:36

Ah.
I'm still running 1.2 because of all the patches I've made...

#3

drewish - July 8, 2008 - 22:45
Status:active» fixed

actually i think this is correct the way it is. otherwise how else would you link to the site?

#4

joachim - July 10, 2008 - 09:25

I've seen a module that has link sanitization -- possibly the weblink module: it checks for something like 'www.domain.com' at the start of the link.
The way I envisaged this is that it's for off-site pages anyway -- isn't the program's homepage the actual current program node?

At any rate, users will continue to omit the http part -- there's nothing we can do about that.

#5

joachim - July 14, 2008 - 14:22

drewish -- take a look at the function link_validate_url in the CCK link module: http://drupal.org/project/link

I've used this module and its behaviour is exactly what I think we should do here too -- both 'www.example.com' and 'http://www.example.com' work as expected.

#6

drewish - July 14, 2008 - 19:02
Version:5.x-1.5» 5.x-2.x-dev
Status:fixed» active

i probably won't have time to work on this but it does seem like a reasonable feature request.

 
 

Drupal is a registered trademark of Dries Buytaert.