Make WordPress Core

Opened 18 years ago

Closed 18 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:
Priority: normal Milestone: 2.8
Component: Users Version: 2.8
Severity: minor Keywords: has-patch
Cc: Focuses:

Description

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 18 years ago.
wp-admin--includes--user.php.2.diff​ (1000 bytes ) - added by josephscott 18 years ago.

Download all attachments as: .zip

Change History (8)

#1 @Denis-de-Bernardy
18 years ago

  • Milestone 2.8 → Future Release

Moving to future pending patch.

#2 @josephscott
18 years ago

  • Cc joseph@… added
  • Keywords has-patch added; needs-patch removed
  • Milestone Future Release → 2.9
  • Severity normal → 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
18 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
18 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
18 years ago

  • Milestone 2.9 → 2.8

#6 @ryan
18 years ago

  • Resolution → fixed
  • Status new → closed

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

Note: See TracTickets for help on using tickets.