Wikipedia link format ?

Need help with something HTML related, this is the place to ask.
Post Reply
conradk
Posts: 117
Joined: Tue Jul 05, 2011 10:41 pm

Wikipedia link format ?

Post by conradk »

Hey,
DOes anybody know why HTML generated by wikipedia creates links like;
[syntax=xhtml]<a href="//es.wikipedia.org/">Link name</a>[/syntax]

What is the doubleslash before the URL all about ?

Thanks for any help you can offer :P

Best regards,
CK
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Wikipedia link format ?

Post by jacek »

Might be a typo ;) I have seen this before though.
Image
conradk
Posts: 117
Joined: Tue Jul 05, 2011 10:41 pm

Re: Wikipedia link format ?

Post by conradk »

Well, Twitter uses it too.

And PHP doesn't think this is a valid URL when using the FILTER_VALIDATE_URL, which is kind of idiotic IMO.

Anyways, thanks for answering :)
libeco
Posts: 104
Joined: Sat May 07, 2011 9:56 am

Re: Wikipedia link format ?

Post by libeco »

I believe this can be used when you don't care whether http or https is used.
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Wikipedia link format ?

Post by jacek »

libeco wrote:I believe this can be used when you don't care whether http or https is used.

That makes sense, but surly just / would do the same thing :?
Image
User avatar
FrederickGeek8
Posts: 148
Joined: Wed Nov 30, 2011 10:31 pm

Re: Wikipedia link format ?

Post by FrederickGeek8 »

jacek wrote:
libeco wrote:I believe this can be used when you don't care whether http or https is used.

That makes sense, but surly just / would do the same thing :?

I would if it is on the same server

// is used when you don't care whether it uses https or http. It defaults to what protocol you are currently using.
Post Reply