Tags:
create new tag
view all tags

Bug: generating a TOC fails if you use a formatted text in a headline

Test case

  • create a page with following input
%TOC%

---+ Test with =monospaced= text
test
  • the headline in the TOC looks good, but the headline itself is destroyed
  • it will look like this:

Test with monospaced text

test

Environment

TWiki version: AthensRelease
TWiki plugins: default
Server OS: Linux
Web server: Apache
Perl version: 5.5.2
Client OS: Windows
Web Browser: Netscape 4.7

-- StefanScherer - 18 Dec 2001

Fix record

In sub makeAnchorHeading, file TWiki.pm, remove the space,

from: <a name =\"$anchorName\">
to: <a name=\"$anchorName\">

    if( $hasAnchor ) {
        # FIXME: '<h1><a name="atext"></a></h1> WikiName' has an
        #        empty <a> tag, which is not HTML conform
        $text = "<nop><h$theLevel><a name=\"$anchorName\"> </a> $theText <\/h$theLevel>";
    } else {
        $text = "<nop><h$theLevel><a name=\"$anchorName\"> $theText <\/a><\/h$theLevel>";
    }

In TWikiAlphaRelease and TWiki.org.

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2001-12-20 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.