Foswiki on GitHub is open for business! Next release meeting: Monday September 29, 1300Z

Item5527: JHotDrawPlugin does not handle hierachical Webs in image maps

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Closed Extension JHotDrawPlugin CrawfordCurrie

Problem

I noticed thatTWikiDraw Plugin does not handle hierachical Webs and also is not nice with non WikiWord topics, which it should allow IMHO.

Suggested Solution

In JHotDrawPlugin.pm you find this code:
    my $map = TWiki::Func::readFile($mapFile);
    # Unashamed hack to handle Web.TopicName links
    $map =~ s/href=\"((\w+)\.)?(\w+)(#\w+)?\"/&_processHref($2,$3,$4,$web)/ge;
    $map = TWiki::Func::expandCommonVariables( $map, $topic );
    $map =~ s/%MAPNAME%/$mapname/g; 

I suggest changing the regexp to:
     $map =~ s/href=\"(($TWiki::regex{webNameRegex})\.)?([^"#]+)(#$TWiki::regex{wikiWordRegex})?\"/&_processHref($2,$3,$4,$web)/ge;

Sorry if this is not the correct place or style to report this issue

-- TWiki:Main/StefanAlthoefer - 12 Apr 2008

Done
Topic revision: r5 - 12 Dec 2008, CrawfordCurrie
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License