Allow comment homepage URLs without http://

I found this way to get it, but when I input the URL as http://www.example.com, it doesn't work.

How can I make it work?

link|improve this question

66% accept rate
feedback

1 Answer

up vote 4 down vote accepted

There is an error in the snippet linked there:

!strpos($edit['homepage'], "http://")

should be:

strpos($edit['homepage'], "http://") === FALSE

or even better, to account for both http and https:

strpos($edit['homepage'], "://") === FALSE
link|improve this answer
Reversed the order of conditions in this answer to better match the intend of the original code. – Damien Tournoud Aug 3 '11 at 15:00
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.