WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#4001 closed defect (bug) (fixed)

clean_url() adds "http://" to relative links

Reported by: donncha Owned by:
Milestone: 2.0.10 Priority: high
Severity: normal Version: 2.0.10
Component: General Keywords:
Focuses: Cc:

Description

clean_url() adds 'http://' to relative links like those found in the upload form. This patch checks if the first character is '/' before adding the protocol.

Attachments (1)

patch.diff (712 bytes) - added by donncha 7 years ago.

Download all attachments as: .zip

Change History (12)

donncha7 years ago

comment:1 donncha7 years ago

Hmm, that patch doesn't fix links to scripts in current directory. The edit link in wp-admin/users.php is broken.

comment:2 foolswisdom7 years ago

Likely relates to #3983.

comment:3 ryan7 years ago

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

(In [5065]) Don't add http:// to relative links. Props donncha. fixes #4001

comment:4 ryan7 years ago

(In [5066]) Don't add http:// to relative links. Props donncha. fixes #4001 for 2.1

comment:5 ryan7 years ago

(In [5067]) Don't add http:// to relative links. Props donncha. fixes #4001 for 2.0

comment:6 ryan7 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopen to fix urls relative to current directory.

comment:7 ryan7 years ago

  • Milestone changed from 2.2 to 2.0.10
  • Version set to 2.0.10

comment:8 ryan7 years ago

(In [5072]) clean_url only REQUEST_URI to avoid breaking the edit link. see #4001

comment:9 ryan7 years ago

(In [5073]) clean_url only REQUEST_URI to avoid breaking the edit link. see #4001

comment:10 ryan7 years ago

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

(In [5088]) Don't prepend protocol to relative links. fixes #4017 #4001 for trunk

comment:11 ryan7 years ago

(In [5091]) Don't prepend protocol to relative links. fixes #4017 #4001 for 2.1

Note: See TracTickets for help on using tickets.