Item13496: WysiwygPlugin unable to handle paramaterized PUBURL / SCRIPTURL macros
Priority: Enhancement
Current State: Confirmed
Released In: n/a
Target Release: minor
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