Foswiki on GitHub is open for business! Next release meeting: Monday Nov. 17, 1300Z

Item2370: TwistyPlugin generates illegal id= values when used in subwebs

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Closed Extension TwistyPlugin  
If the TwistyPlugin is used in a subweb, it generates span tags with illegal ids.

For instance, if the subweb is called Main.Test, then the span ids for a twisty item in topic FooBar will be
<span id="twistyIdMain/TestFooBarlshow">
<span id="twistyIdMain/TestFoobarlhide">

Unfortunately, "/" is not a legal character in a id string.

This is fairly clearly fixable in _createId in TwistyPlugin.pm , possibly just by
$theWeb =~ s#/##o;

Is there likely to be any problem with the fact that the result could conceivably clash with another valid Web name?


The only time overlapping web/topic names would be a problem is with the remember="on" setting, that stores the twisty state in a cookie.

But it can be prevented by changing the / separator to for example subweb, for example twistyIdMainsubwebTestFoobarlshow.

-- ArthurClemens - 17 Nov 2009

ItemTemplate edit

Summary TwistyPlugin generates illegal id= values when used in subwebs
ReportedBy PatrickGosling
Codebase 1.0.9, 1.0.8, 1.0.7, trunk
SVN Range Foswiki-1.0.7, Sun, 20 Sep 2009, build 5061
AppliesTo Extension
Component TwistyPlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins distro:8786820911e7 distro:b960bea8cccb distro:2300b941bb1d
TargetRelease patch
ReleasedIn 1.0.10
Topic revision: r7 - 08 Sep 2010, KennethLavrsen
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License