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
--
MarcBoivin - 28 Jul 2006
Answer
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_[v01].doc][file with [brackets] 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
--
SteffenPoulsen - 29 Jul 2006