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.

Topic revision: r2 - 20 Dec 2001 - 07:27:11 - PeterThoeny
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback