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

(Copied from TWiki:Codev.HeaderRenderingWithWikiWordsBroken)

Headers with WikiWords don't render correctly in Dakar. This behavior seems to have appeared before the MultiLevelWikiWebs merge.

Test case

This code:

---+++ WebPreferences will break this header

Currently renders like this:

WebPreferences will break th"> WebPreferences will break this header

Environment

TWiki version: TWikiAlphaRelease
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: OS X 10.3
Web server: Apache 1.3.33
Perl version: 5.8.1-RC3
Client OS: OS X 10.3
Web Browser: Firefox 1.0.4

-- PeterNixon - 05 Jul 2005

Impact and Available Solutions

WhatDoesItAffect: Rendering %WHATDOESITAFFECT%
AffectedExtensions: %AFFECTEDEXTENSIONS%
AffectedReleases: latest TWikiAlphaRelease %AFFECTEDRELEASES%
HaveQuickFixFor: %HAVEQUICKFIXFOR%

Follow up

Looks like WikiWords are getting expanded inside header markers (the <a name="header text"></a> thingy):

---+++ WebPreferences will break this header

produces this:


<h3><a name="<a href="http://g5/dakar/bin/view/Sandbox/Test2/WebPreferences 
class="twikiLink">WebPreferences</a> will break th"></a> <a 
href="http://g5/dakar/bin/view/Sandbox/Test2/WebPreferences" 
class="twikiLink">WebPreferences</a> will break this header </h3>

-- TWiki:Main.PeterNixon - 05 Jul 2005

Thanks Peter. Looks like TOC is proken on Cairo too, judging from the TOC at the top of the page.

BTW, could you report problems to the Bugs web rather than here, please? It saves them getting lost. Thx

-- TWiki:Main.CrawfordCurrie - 05 Jul 2005

I think it's just picking up the H3 tag I used in the test case. I'll re-file in the bugs web.

-- TWiki:Main.PeterNixon - 05 Jul 2005

Double-bracket links are not being filtered from the anchor name, and are subsequently rendered. Removing the double-brackets from the anchorName seems to fix the problem. Here's a patch for Render.pm

Index: lib/TWiki/Render.pm
===================================================================
--- lib/TWiki/Render.pm (revision 4518)
+++ lib/TWiki/Render.pm (working copy)
@@ -353,6 +353,9 @@
        return substr($anchorName, 1);
     }
 
+    $anchorName =~ s/\s*\[\s*\[.*?\]\s*\[(.*?)\]\s*\]/$1/og; # remove double bracket link 
+    $anchorName =~ s/\s*\[\s*\[\s*(.*?)\s*\]\s*\]/$1/og; # remove double bracket link
+
     if ( $compatibilityMode ) {
        # remove leading/trailing underscores first, allowing them to be
        # reintroduced

-- TWiki:Main.PeterNixon - 06 Jul 2005

This patch passed necessary testing and has been applied to the DEVELOP branch.

-- TWiki:Main.PeterNixon - 06 Jul 2005

Fix record

Discussion

ItemTemplate
Summary Headers with WikiWords Render Incorrectly in Dakar
ReportedBy TWiki:Main.PeterNixon
Priority Urgent
CurrentState Closed
WaitingFor

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r3 - 2005-07-06 - TWikiGuest
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback