Can we auto-add http:// to links? January 20, 2006 2:29 PM   Subscribe

Small, but unlikely pony request: When a user creates a link to an external site, but forgets the "http://", a MeFi error page results. It would be helpful if the system scanned the links in a post and tried to detect these orphaned links.
posted by o2b to Feature Requests at 2:29 PM (10 comments total)

Good idea.
posted by Rothko at 2:59 PM on January 20, 2006


I could just search for any instance of <a href=" and if the next 7 chars aren't http://, then I could insert them.
posted by mathowie (staff) at 3:44 PM on January 20, 2006


You could use that same parser to perform an action on mailto: links as well, were you inclined.
posted by j.edwards at 4:20 PM on January 20, 2006


It doesn't seem like there'd be many (if any), but relative links to pages within MetaFilter would be broken if that were automatically added.
posted by hootch at 4:52 PM on January 20, 2006


mathowie writes "search for any instance of <a href=' and if the next 7 chars aren't http://, then I could insert them."

The parser should be a little smarter than that otherwise we couldn't post links to https or ftp URLs.
posted by Mitheral at 4:43 AM on January 21, 2006


xactly. And shouldn't folks that think "www" is some magick protocol formula learn by now that is the "http://" "ftp://" "https://" etc that really counts? Teach 'em the hard way I say. Lets all mock their broken links!
posted by dabitch at 6:13 AM on January 21, 2006


I could just search for any instance of <a href=" and if the next 7 chars aren't http://, then I could insert them.

The more common mistake that I see seems to be double http://'s, e.g. someone trying to post a link to this thread ends up with

http://http://metatalk.metafilter.com/mefi/11083

so you'd (also?) want something that converts http://http:// to http://.
posted by hangashore at 9:14 AM on January 21, 2006


What if instead of converting, you just throw up a warning? That way we don't silently munge correct-but-gotcha'd thing by people who know what they're doing, and we offer some actual instruction to the folks making the mistakes.
posted by cortex at 10:38 AM on January 21, 2006


mathowie, it's better to give out an error message than to automatically correct the error, e.g. "ttp://link.com" would be automatically corrected to "http://ttp://link.com", and there are some other cases in which the automatic correction would result in an incorrect link.
posted by Sharcho at 10:39 AM on January 21, 2006


I'm with those who say let people learn to make their own links. It's not exactly rocket surgery. Links on MetaFilter are made in exactly the same way as on the last Web page you made.

If you've never made a Web page, well, there's no time like the present to learn how, is there?
posted by kindall at 12:48 PM on January 21, 2006


« Older Montreal Meetup   |   Proxies for AskMe Newer »

You are not logged in, either login or create an account to post comments