Talk:UNC links

A proposed replacement that should generate XHTML-compliant links for both IE and FF: The last part just displays the link's address if no display text was specified. You can take out the  if you prefer the anonymous (numbered) links instead.


 * Are you sure that backslashes are invalid in XHTML links? I put the following code into the W3C HTML Validator, and it passed:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  Test Test link
 * --Ed Brey 12:59, 18 September 2008 (UTC)


 * No, I'm not sure, I got a warning about replacing backslashes with slashes from the HTML Validator extension (based on HTML Tidy). --IByte 24 Sep 2008 9:00 UTC


 * Tidy doesn't give any help on that warning within the validator, but I think I see where it's coming from. RFC 1738 section 3.10 says this:

A file URL takes the form:

file:// /

where is the fully qualified domain name of the system on  which the is accessible, and is a hierarchical directory path of the form / /.../.
 * This leaves some ambiguity with what to do with UNCs. In the UNC \\Host\Folder, if you create a URI file://Host/Share, it doesn't work on Firefox 3. However, the URI file:///\\Host\Share does. IE7 automatically converts the latter form to the former. Both browsers convert the backslashes to slashes. Backslashes are good because they make it obvious in the source that a UNC is intended. Slashes are good because they make the source most closely match what the browser ends up with and they keep Tidy happy. In the balance, I'd say that converting to slashes is the best approach. --Ed Brey 11:18, 26 September 2008 (UTC)


 * I think that anonymous links are preferable to reproducing the URI in the visible text so that file hyperlinks are consistent with other hyperlinks in terms of formatting. The same rationale that applies for not showing the raw URI for a typical HTTP URI would apply to not showing the raw UNC. --Ed Brey 11:23, 26 September 2008 (UTC)

template doesnt seem to work...
the template is giving me some troubles.

i used



which when the template is saved it looks like this:

|%20}}|\|/}}

and it recodes this

so that it appears as

\\server\share | |%20}}|\|/}} test

and redirects to

file:///{{#replace:{{%23replace:

please help!

To Resolve the problem
PHP 5.3 seems to be more strict with handing over of values/references. In this case the culprit probably is Language.php. Try to change


 * - function getMagic( &$mw ) {
 * + function getMagic( $mw ) {

Encoding still a problem
I'm using PHP 5.2.6-1+lenny4 and I'm getting the previous users error in which | |%20}}|\|/}} is added to the URL.