On 01/08/2014 03:10 PM, Emmanuel Engelhart wrote:
> Le 08/01/2014 23:56, Gabriel Wicke a écrit :
>> On 01/08/2014 01:29 PM, Emmanuel Engelhart wrote:
>>> Not clean and not robust, because what we will have to build (to
>>> identify an external link) a not so easy to maintain heuristic.
>>
>> The good news is that removal of ./ also entails percent-encoding
>> literal colons in internal links to avoid them being interpreted as
>> protocols. That in turn makes matching for external links pretty simple:
>>
>> /^[a-zA-Z]+:/
> 
> This looks good indeed (and is easy to maintain), but still an heuristic
> isn't it? In the worst case we will have titles matching this regexp.


Titles can't match this regexp after this change as we'll percent-encode
all literal colons to avoid clients interpreting them as protocols. That
was the reason why we added the ./ in the first place, but the idea now
is making all links relative to the wiki root rather than the current
page name. Main reason for this is that we don't want to rewrite HTML on
page rename or when combining HTML from different pages.

Gabriel

_______________________________________________
Wikitext-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitext-l

Reply via email to