Item12824: A Wiki-style link to an attached file, which has spaces in its filename, gets broken under WYSIWYG editing
Priority: Normal
Current State: Closed
Released In: 2.0.0
Target Release: major
I am using
TopicInteractionPlugin 3.51, Foswiki 1.1.9. If someone uploads a file which has spaces in its name, the spaces are NOT removed from the name, as it used to be. Though it gets rendered correctly. In 'Edit Wiki Text' mode one can write something like
[[%ATTACHURLPATH%/FilenameWithSpaces][FilenameWithSpaces]].
However, if one opens this page in WYSIWYG editing and just save it, the link gets broken to something like
[[%ATTACHURLPATH%/StuffBeforeFirstSpace]].
--
ValentinKozlov - 25 Mar 2014
See also
Support.Question1433
--
MichaelDaum - 25 Mar 2014
This is probably because Wysiwyg attempts to support a very old space delimited linking format. It might be necessary to add a flag to disable the deprecated link format, and support enabled spaces.
# Convert obsolete format link [[http://blah.com link text]]
if ( $class eq 'TMLlink'
&& $url =~ m/\s/
&& $url =~ m/^$Foswiki::regex{linkProtocolPattern}:/ )
{
( $url, $text ) = split( / /, $url, 2 );
}
--
GeorgeClark - 29 May 2014
This is fixed by
Item12050
--
GeorgeClark - 25 Nov 2014