#790 closed enhancement (duplicate)
auto-add http://
Reported by: | anonymousbugger | Owned by: | 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)
#3
@
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.
Note: See
TracTickets for help on using
tickets.
something like:
if ( !preg_match( '/:\/\', $url ) ) discard http://, ftp://...