Tags:
create new tag
, view all tags

Question

Is it possible to use bracket in a TWikiLink.

Here's what I'm trying to do: [[file://%INFODEVLAN%\%PROJECT%\System Design Documents\Proposed equipment design\Proposed Design (shortcut) [NR-TS-0007].pdf.lnk][Link to file]]. It doesn't work because of the "[" and "]" in the path to the link.

Is there any character to escape the TWiki parser? I tried using the nop tag: [[<nop>file://%INFODEVLAN%\%PROJECT%\System Design Documents\Proposed equipment design\Proposed Design (shortcut) [NR-TS-0007].pdf.lnk][Link to file]]. Didn't do any good.

Environment

TWiki version: TWikiRelease04x00x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories: Missing functionality

-- MarcBoivin - 28 Jul 2006

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

You would have to escape the brackets for this to work. I.e. you could use something like:

   * [[file://server01/document01_&#91;v01&#93;.doc][file with &#91;brackets&#93; in the file name]]

Which renders as

-- SteffenPoulsen - 28 Jul 2006

I know this one, but I'm not trying to teach users html ascii table. I was really looking for a way to escape the parser rather then manually converting the "special" characters. Is that possible?

-- MarcBoivin - 28 Jul 2006

If you are in a case of DontMakeMeThink, I would go right to teaching them <a href= .. > instead of the the bracket notation. That works for the most part (stuff like ' in windows filenames still needs to be handled).

For twiki applications you could use ENCODE, the spreadsheetplugin or <literal> tags around the filename to substitute/ignore the most annoying chars.

-- SteffenPoulsen - 28 Jul 2006

Only [[, ][, and ]] are interpreted in a special way, single square brackets should be OK. Your example fails because file:// links must not contain spaces. Special chars need to be URL encoded, e.g. replace spaces with %20 and you should be OK. So, your example should be written as:

[[file://%INFODEVLAN%\%PROJECT%\System%20Design%20Documents\Proposed%20equipment%20design\Proposed%20Design%20(shortcut)%20[NR-TS-0007].pdf.lnk][Link to file].]]

-- PeterThoeny - 28 Jul 2006

Wow, looks like there is more than one way to shave this goat smile

-- SteffenPoulsen - 29 Jul 2006

 
Topic revision: r6 - 2006-07-29 - SteffenPoulsen
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.