You are here: Foswiki>Tasks Web>Item11862 (02 Jun 2012, GeorgeClark)Edit Attach

Item11862: The %ATTCHURL is not preserved during WYSIWYG

pencil
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Engine
Component: WysiwygComponent
Branches: Release01x01 trunk
Reported By: JozefMojzis
Waiting For:
Last Change By: GeorgeClark
Enter into topic:

   * [[%ATTACHURL%/TestFileName.pdf][TestFileName.pdf]]: TestFileName.pdf

edit with WYSIWIG, and the %ATTACHURL get converted into

   * [[http://example.com/fw/pub/Sandbox/TestTopic4/TestFileName.pdf][TestFileName.pdf]]: TestFileName.pdf

IMO, the macro should be preserved.

-- JozefMojzis - 14 May 2012

Hm... I have "a" fix, not sure if it's a good fix. The expansion appears to happen in TMCE Editor, not in the WysiwygPlugin. "Protecting" the http://translate.foswiki.org/pub/Tasks/Item11862 macro is not readily done because the <span needed to protect the macro can't be inserted into the <a link tag.

My solution is to test if the saved url matches the %ATTACHURL% macro and if so, substitute it back. This has the side effect of converting a manually entered link that matches the current topic %ATTACHURL% back to the macro form.

-- GeorgeClark - 14 May 2012

Actually, the fix for Item11814 broke the roundtrip of %ATTACHURL%. So I've reverted that and tried a different approach.

-- GeorgeClark - 15 May 2012

This was not broken in the 1.1.5 release. No need to document for 1.1.6. Closing the task.

-- GeorgeClark - 02 Jun 2012
 
Topic revision: r9 - 02 Jun 2012, 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