• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item6634: Topic links in included topics not web-prefixed if WikiWord ends with punctuation

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal Closed   patch 5.0.2

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


TWiki fixed topic link if you include a topic from one web into another web. This is done to prevent broken links.


Web1 has TopicOne with this content:

Links: TopicA, TopicB

Now create TopicTwo in Web2 and include this:


The result of the include should result in:

Links: Web1.TopicA, Web1.TopicB

But there is a bug, it returns:

Links: TopicA, Web1.TopicB

Bug: The first link is not prefixed with the web name.

Fix: Use more relaxed termination test for WikiWord link. TWiki auto-links WikiWord links if prefixed with whitespace or parenthesis, and with any text following the WikiWord. The include fix is more strict, it expects WikiWords to be terminated by whitespace or |.


--- TWiki.pm   (revision 20025)
+++ TWiki.pm   (working copy)
@@ -2058,7 +2058,7 @@
     unless( $options->{in_noautolink} ) {
         # 'TopicName' to 'Web.TopicName'
-        $text =~ s#(?:^|(?<=[\s(]))($regex{wikiWordRegex})(?=\s|\)|$)#$fromWeb.$1#go;
+        $text =~ s#(?:^|(?<=[\s(]))($regex{wikiWordRegex})#$fromWeb.$1#go;
     # Handle explicit [[]] everywhere

-- TWiki:Main/PeterThoeny - 2011-01-12

Summary Topic links in included topics not web-prefixed if WikiWord ends with punctuation
ReportedBy TWiki:Main.PeterThoeny
Codebase 5.0.1, ~twiki4
SVN Range TWiki-5.0.1, Mon, 20 Dec 2010, build 20024
AppliesTo Engine

Priority Normal
CurrentState Closed

Checkins TWikirev:20174 TWikirev:20175
TargetRelease patch
ReleasedIn 5.0.2
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r4 - 2011-05-07 - PeterThoeny
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback