You are here: Foswiki>Tasks Web>Item12824 (05 Jul 2015, GeorgeClark)Edit Attach

Item12824: A Wiki-style link to an attached file, which has spaces in its filename, gets broken under WYSIWYG editing

pencil
Priority: Normal
Current State: Closed
Released In: 2.0.0
Target Release: major
Applies To: Extension
Component: WysiwygPlugin
Branches:
Reported By: ValentinKozlov
Waiting For:
Last Change By: GeorgeClark
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
 

ItemTemplate edit

Summary A Wiki-style link to an attached file, which has spaces in its filename, gets broken under WYSIWYG editing
ReportedBy ValentinKozlov
Codebase 1.1.9, trunk
SVN Range
AppliesTo Extension
Component WysiwygPlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins
TargetRelease major
ReleasedIn 2.0.0
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release01x01Checkins
Topic revision: r6 - 05 Jul 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy