Item5527: JHotDrawPlugin does not handle hierachical Webs in image maps

Priority: Normal
Current State: Closed
Released In:
Target Release: n/a
Applies To: Extension
Component: JHotDrawPlugin
Reported By: TWiki:Main.StefanAlthoefer
Waiting For: CrawfordCurrie
Last Change By: CrawfordCurrie


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 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

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 Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy