You are here: Foswiki>Tasks Web>Item6013 (14 Dec 2008, GeorgeClark)Edit Attach

Item6013: TOOLTIP breaks EDITTABLE variable protection

pencil
Priority: Normal
Current State: Closed
Released In:
Target Release: n/a
Applies To: Extension
Component: ToolTipPlugin
Branches:
Reported By: TWiki:Main.VickiBrown
Waiting For: Foswiki:Main.GeorgeClark
Last Change By: GeorgeClark
If I put a cal to TOOLTIPinside an EDITTABLE cell, when the table is saved, the TOOLTIP code is transformed into incorrect JavaScript.

I wouldn't mind so much if it was transformed into correct JavaScript, but after editing the table, the result doesn't work.

Initial content of table
 %EDITTABLE{format="label|textarea,3x30|"}%
| apple | %TOOLTIP{TEXT="Whaoooo !" FONTCOLOR="#336699" TITLE="Tooltip" SHADOW="true" SHADOWCOLOR="#ccaacc" FONTSIZE="18px"}% put your mouse here, you should see a tooltip %TOOLTIP{END}%| 

Post-edit with EDITTABLE
 %EDITTABLE{format="label|textarea,3x30|"}%
| apple | <a border="0" href="javascript:void(0);"  onmouseover="TEXT="Whaoooo !" FONTCOLOR="#336699" TITLE="Tooltip" SHADOW="true" SHADOWCOLOR="#ccaacc" FONTSIZE="18px";return escape('')"> put your mouse here, you should see a tooltip </A> |

(If the cell isn't a textarea, it's worse because the content is truncated badly.)

Note that a %TWISTY% within an editable cel is not expanded to the equivalent JS. The %TOOLTIP% should not be expanded either.

Workaround: use the "without plugin installed" JS as shown in ToolTipPlugin examples.

-- TWiki:Main/VickiBrown - 22 Sep 2008

What version of TWiki and EditTablePlugin is this?

-- TWiki:Main.KennethLavrsen - 23 Sep 2008

Found in TWiki 4.05 with various patch updates running EditTable 4.8.4, $Rev: 17302 (04 Aug 2008)

Reproducible in TWiki 4.1.2

EditTable docs say "Any TWiki variable inside a table cell will be preserved. For instance, %TOPIC% will not get expanded to the current topic name."

-- TWiki:Main.VickiBrown - 23 Sep 2008

For some reason ToolTipPlugin has the rendering in postRenderingHandler. This is after EditTablePlugin can protect the tags. Change it to commonTagsHandler and it works.

I would add that this plugin could need a registerTagHandler.

Changing to ToolTipPlugin issue, reversing the summary.

I've converted the plugin to use registerTagHandler

This seems to fix the problem. Tips survive EditTablePlugin

ItemTemplate edit

Summary TOOLTIP breaks EDITTABLE variable protection
ReportedBy TWiki:Main.VickiBrown
Codebase
SVN Range TWiki-5.0.0, Fri, 12 Sep 2008, build 17509
AppliesTo Extension
Component ToolTipPlugin
Priority Normal
CurrentState Closed
WaitingFor Foswiki:Main.GeorgeClark
Checkins ToolTipPlugin:dc02d93ff65c
TargetRelease n/a
ReleasedIn
Topic revision: r7 - 14 Dec 2008, 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