The validate function for the homepage field of a Comment form currently requires that the URL includes http:// - which is an outdated and non user friendly way of expecting someone to input their website address. I have figured out how to alter the Comment Module to allow someone to enter either www.example.com, http://example.com or even https://www.example.com (I found the details on http://drupal.stackexchange.com/questions/1037/allow-comment-homepage-ur...). But I haven't figured out yet how to get my own module to work to make the change (see http://drupal.org/node/449818#comment-5828200).

In the meantime, I thought I would suggest that it be included in Drupal Core in future editions. The code that is required directly before the validation of the homepage field is

if (strpos($edit['homepage'], "://") === FALSE) {
    $edit['homepage'] = "http://" . $edit['homepage'];
}

F

Comments

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.

cedewey’s picture

Version: 6.25 » 11.x-dev
Issue summary: View changes
Status: Closed (outdated) » Active

This is still an issue in Drupal 10+ so I'm re-opening this issue. I'm also adding the Usability tag because this helps users who are posting comments on a site.

akhil babu’s picture

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.