[Pmwiki-users] Spaces in file names
Patrick R. Michaud
pmichaud
Mon Mar 1 09:05:38 CST 2004
On Mon, Mar 01, 2004 at 08:17:50AM -0000, Pmwiki-users-bounces at pmichaud.com wrote:
> This worked beautifully except when I typed "file:some stuff.xls". Do you
> think you could get it to type for me? :)
That's coming in the next major release. ;-)
But somewhat seriously, if you want "file:some stuff.xls" to
work, you could do (in addition to the other code I gave):
$LinkPatterns[300]['"file:.*?"'] = 'FmtSpacedUrlLink';
Pm
(original code below)
> $LinkPatterns[300]['\\bfile:".*?"'] = 'FmtSpacedUrlLink';
>
> function FmtSpacedUrlLink($pat,$ref,$txt) {
> global $FmtUrlLink;
> $url = str_replace(array(' ','"'),array('%20',''),$ref);
> if (is_null($txt)) $txt=str_replace('"','',$ref);
> return $FmtUrlLink($pat,$url,$txt);
> }
>
> This allows markup of the form
>
> file:"\\server\some dir\some other dir\pain in the butt.xls"
More information about the pmwiki-users
mailing list