Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#9804 closed defect (bug) (fixed)

WordPress automatically sets the website URL of an user's profile to http://

Reported by: peaceablewhale Owned by:
Milestone: 2.8 Priority: normal
Severity: minor Version: 2.8
Component: Users Keywords: has-patch
Focuses: Cc:


When an user does not have a website URL in his profile, WordPress automatically sets it to "http://". The expected behavior should be an empty string.

Attachments (2)

wp-admin--includes--user.php.diff (970 bytes) - added by josephscott 12 years ago.
wp-admin--includes--user.php.2.diff (1000 bytes) - added by josephscott 12 years ago.

Download all attachments as: .zip

Change History (8)

#1 @Denis-de-Bernardy
12 years ago

  • Milestone changed from 2.8 to Future Release

Moving to future pending patch.

#2 @josephscott
12 years ago

  • Cc joseph@… added
  • Keywords has-patch added; needs-patch removed
  • Milestone changed from Future Release to 2.9
  • Severity changed from normal to minor

The edit_user() function in wp-admin/includes/user.php hard codes a 'http://' to the front of the 'Website' field if the regex for the scheme (http,ftp,irc,telnet,etc.) fails. An additional check is needed to see if the field is empty.

I've added a simple patch that runs the scheme regex check only if the field is not empty.

At best this is a minor inconvenience so I'm going to bump this to the 2.9 milestone.

#3 @mrmist
12 years ago

Patch works for new users, though existing users that have had the http:// bit saved already still show it. Potentially could be worth validating the saved output to strip it.

#4 @josephscott
12 years ago

True. I wasn't going to worry about that. But if we're going to wait for 2.9 for this anyway there will lots of WP blogs with 'http://' saved. Added new diff to look for 'http://' and force it an empty string.

#5 @ryan
12 years ago

  • Milestone changed from 2.9 to 2.8

#6 @ryan
12 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [11320]) Don't set user's url to http://. Props josephscott. fixes #9804

Note: See TracTickets for help on using tickets.