Make WordPress Core

Opened 19 years ago

Closed 19 years ago

Last modified 15 years ago

#790 closed enhancement (duplicate)

auto-add http://

Reported by: anonymousbugger's profile anonymousbugger Owned by: ryan's profile ryan
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

simple suggestion - why not automatically add http:// to links when necessary -- e.g. the commentor's web site.

Change History (4)

#1 @anonymousbugger
19 years ago

  • Patch set to No

#2 @anonymousbugger
19 years ago

something like:

if ( !preg_match( '/:\/\', $url ) ) discard http://, ftp://...

$url = 'http://' + $url

#3 @anonymousbugger
19 years ago

Won't this break relative URLs? i.e. Consider the following:

I want to make my site portable and have a directory off off the webroot called /album. I can reference this via a link simply with /album and it will take the user to the correct location. If you assume that every link needs http:// prepended to it, this behavior will break relative URL's.

#4 @ryan
19 years ago

  • duplicate_id changed from 0 to 741
  • Owner changed from anonymous to rboren
  • Resolution changed from 10 to 60
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.