SID-02011: Forced Links breaking if path has spaces
| Status: |
Answered |
TWiki version: |
6.0.1 |
Perl version: |
5.12.3 |
| Category: |
CategoryEditing |
Server OS: |
Windows 2003 |
Last update: |
11 years ago |
I'd like to link to a file on the wiki server using a relative path
/files/my file.docx
The forced link is:[[file:///files/my file.docx][My File]]
The first save is ok. However when I reopen with the wysiwyg editor the link has changed to: [[file:///files/my][file.docx]]
Adding a %20 fixes: [[file:///files/my%20file.docx][My File]]
but is tedious for long path names.
We just migrated from foswiki where spaces didn't cause problems. Are links different in twiki?
--
Andy Frecuente - 2015-01-16
Discussion and Answer
The
[[link title]] is a an undocumented syntax in TWiki since pretty much the beginning - it was one of the developer's favorite syntax. The documented syntax is
[[link][title]].
A space in a URL is not supported in HTML anyway - spaces need to be URL encoded.
%20 is one way, a
+ is another way. In your case I recommend to write
[[file:///files/my+file.docx][My File]].
--
Peter Thoeny - 2015-01-17
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.