W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2010

[whatwg] Simple Links

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 27 Jul 2010 19:13:31 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1007271900560.7470@ps20323.dreamhostps.com>
On Tue, 30 Mar 2010, Christoph P?per wrote:
>
> If you think about various syntax variants of wiki systems they?ve got 
> one thing in common that makes them preferable to direct HTML input: 
> easy links! (Local ones at least, whatever that means.) The best known 
> example is probably double square brackets as in Mediawiki, the engine 
> that powers the Wikimediaverse. A link to another article on the same 
> wiki is as simple as ?[[Foo]]?, where HTML would have needed ?<a 
> href="Foo">Foo</a>?.

HTML would actually need more, since you also need to add a class for 
indicating whether the page at the end of the link is available or not.


> I wonder whether HTML could and should provide some sort of similar 
> shortening, i.e. ?<a href>Foo</a>? or even, just maybe, ?<a>Foo</a>?. 
> The UA would append the string content, properly encoded, to the base 
> Web address as the hyperlink?s target, thus behave as had it encounters 
> ?<a href="Foo">Foo</a>?.

I looked at some pages that I use regularly, and couldn't find any pages 
that matched the pattern <a href="(.+)">$1</a>, so I don't know that that 
is that much of an improvement.

I also randomly picked a Wikipedia page (Potato) and looked at some of the 
links there. The only link that matched that pattern on the whole page was 
in the footer that only gets displayed in the print media:

   <div class="printfooter"> Retrieved from "<a href="http://en.wikipedia.org/wiki/Potato">http://en.wikipedia.org/wiki/Potato</a>"</div> 

I'm not sure it's really worth it to make a syntax change just to handle 
the case of a link's text itself being a URL, since most of the time that 
kind of link will be autogenerated anyway.


I haven't changed the spec.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 27 July 2010 12:13:31 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:25 UTC