Are you using the visual editor or the HTML editor?
The http://
is automatically included when adding links in the visual editor. However, it is also selected, so that if you just paste a link without that, it will disappear. You have to deselect it first (hit the down arrow) to preserve it.
On the other hand, if you are pasting a URL which includes that, you need to nothing. Just paste.
How does WordPress know you didn’t intend to put in a different URL?
What if you want to put in mailto:foo@example.com
or ftp://....
There’s more than just http 🙂
Thread Starter
Gouri
(@gouri)
@ kjodle: I am using Visual editor. Though http:// shows up by default in the box, it gets easily replaced when we copy paste something.
Nothing goes wrong if we do everything correctly, but the problem occurs when we omit to do something.
It’s worth noticing how MS Word handles the URL text without http://
Thread Starter
Gouri
(@gouri)
@ Ipstenu: Maybe you’re right. But even then, changing the final output as mentioned in the post above (prefixing the site’s URL) is unwarranted.
Also, It should not a problem sensing whether the user intends to use mailto: or ftp://. MS Word does that so beautifully. If your URL starts with mailto: or ftp://, it does not prefix http://
But what if you simply want to refer to a site/company such as Yahoo.com but do not want to make a link? At least with the current system, you have a choice. With your approach, there would be no such choice.
Thread Starter
Gouri
(@gouri)
@ esmi: We are talking about the hyperlinking process that starts once you click on the hyperlink icon in the visual editor.
If you do not want to hyperlink, don’t insert the link (don’t use the hyperlink icon in the visual editor).
Gouri, since there’s no one-right way to do it correctly for all situations, this setup provides the flexibility we need.
If you force http:// in, then I can’t use relative URLs (i.e. /foo/) which I shouldn’t anyway, but some people wanna. We shouldn’t nanny-gate them.
Personally I’d like it so that when you click on add a link, http:// isn’t already selected, but the cursor’s at the end of the line :/
Thread Starter
Gouri
(@gouri)
Ya, looks like the relative URL thing comes in the way of implementing this suggestion.
Keeping the http:// intact in the beginning would keep things simple, but as you said in your earlier post, it would again be a hurdle if somebody wanted to replace it with ftp:// or mailto: or something similar.
It’s worth noticing how MS Word handles the URL text without http://
You’re comparing WordPress to a MS product? Dude…..
Nothing goes wrong if we do everything correctly
Well, there’s your solution. There’s one way to do things correctly and an infinite number of ways to do it wrong. It’s kind of hard to build a system which accounts for that.
BTW, I so detest the way that MSO handles the whole link thing (and lots else, besides), that I switched to OpenOffice. All happy now.