Item13496: WysiwygPlugin unable to handle paramaterized PUBURL / SCRIPTURL macros

pencil
Priority: Enhancement
Current State: Confirmed
Released In: n/a
Target Release: minor
Applies To: Extension
Component: WysiwygPlugin
Branches:
Reported By: GeorgeClark
Waiting For:
Last Change By: CrawfordCurrie
Need some enhancement post 2.0

IMG tags that use parameterized versions of PUBURL or SCRIPTURL don't render correctly during edit. And the round-trip code doesn't know about the new parameterized format.

Also somewhat related, IMG tag with any macro not supported for the roundtrip ends up as a corrupted image during edit due to the unexpanded macros.

See Item13495 for reference to examples

-- GeorgeClark - 03 Jul 2015

The reason is that %PUBURL{param="val"}% is not statically reversible when used in the context of a URL. The only way I can think of to handle it is to use an XML data param to store the original URL param, then blindly expand the URL. For example,

<img src="%PUBURL{web="Toast" topic="AndButter"}%">
modify in TML2HTML to
<img src="url expansion of macro" data-unexpanded-src="%PUBURL{web="Toast" topic="AndButter"}%"/>
Then, in HTML2TML compare the post-edit src with the expansion of data-unexpanded-src and if they differ, assume that src is a new value.

As you can see, this is quite a lot of work. Too much for 2.0 So my view is that we document the limitations of PUBURL (and friends) in a Support FAQ.

-- Main.CrawfordCurrie - 03 Jul 2015 - 07:02

 

ItemTemplate edit

Summary WysiwygPlugin unable to handle paramaterized PUBURL / SCRIPTURL macros
ReportedBy GeorgeClark
Codebase 2.0.0 RC1, trunk
SVN Range
AppliesTo Extension
Component WysiwygPlugin
Priority Enhancement
CurrentState Confirmed
WaitingFor
Checkins
TargetRelease minor
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release01x01Checkins
Topic revision: r2 - 03 Jul 2015, CrawfordCurrie
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