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

Item6214: I18N. The auto anchor of heading is broken when using all capital WikiWord.

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine View Normal New   minor 4.3.0

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

I18N problem. Locale is zh_CN.UTF-8. Encoding utf-8.

When an all capital word, like SVN, appears in a heading

---++ This is a SVN topic
the generated anto-anchor is broken. Something like:
<a name="This is a <a href="SVN">SVN</a> topic">This is a SVN Topic"</a>

Cause: This bug is caused by lib/TWiki/Render.pm : makeAnchorName()

   $anchorName =~ s/($TWiki::regex{wikiWordRegex})/_$1/go;
All capital word is not matched by this line.

Hotfix: edit lib/TWiki.pm

< $regex{wikiWordRegex} = qr/[$regex{upperAlpha}]+[$regex{lowerAlphaNum}]+[$regex{upperAlpha}]+[$regex{mixedAlphaNum}]*/o;

>  $regex{wikiWordRegex} = qr/[A-Z]{3,}|[$regex{upperAlpha}]+[$regex{lowerAlphaNum}]+[$regex{upperAlpha}]+[$regex{mixedAlphaNum}]*/o;

-- TWiki:Main/FengZhaolin - 14 Mar 2009

Thanks Feng for reporting this bug! At TWiki:Codev/GeorgetownReleaseMeeting2009x03x23 we decided to re-prioritize this bug to normal. The impact of the proposed fix needs to be investigated carefully.

-- TWiki:Main.PeterThoeny - 24 Mar 2009

ItemTemplate
Summary I18N. The auto anchor of heading is broken when using all capital WikiWord.
ReportedBy TWiki:Main.FengZhaolin
Codebase 4.2.4
SVN Range TWiki-5.0.0, Mon, 23 Feb 2009, build 17838
AppliesTo Engine
Component View
Priority Normal
CurrentState New
WaitingFor

Checkins

TargetRelease minor
ReleasedIn 4.3.0
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2009-03-24 - PeterThoeny
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback