Tags:
create new tag
, view all tags

Bug: Incorrect nesting of list tags and verbatim tags

A list item enclosed by <verbatim>...</verbatim> tags that are in turn under a list item swaps the order of the resulting </ul> and </pre> tags in the rendered page.

Test case

Suppose you write this (this example is derived from acutal code in the beta's TWikiPreferences page):

   * A list item.
<verbatim>
      * A sublist item.
</verbatim>

This code is rendered like this:

  • A list item.
      * A sublist item.

However, the actual HTML is:

<ul>
<li>A list item.
<pre>
      * A sublist item.
</ul>
</pre>

Note how the </pre> closing tag occurs after the </ul> closing tag. It should like like this:

<ul>
<li>A list item.
<pre>
      * A sublist item.
</pre>
</ul>

Netscape, IE, and Mozilla browsers will display the resulting badly nested HTML without complaint, but the W3C's Amaya browser chokes on the flipped tags.

Fix record

Added this in TWiki::getRenderedVersion :

        if( $insidePRE || $insideVERBATIM ) {
            # inside PRE or VERBATIM

            # close list tags if any
            if( @code ) {
                $result .= &emitCode( "", 0 );
                $code = "";
            }

Environment

TWiki version: Beta 20010803
TWiki plugins: DefaultPlugin
CalendarPlugin
InterwikiPluginEarlyDev
LocalCityTimePlugin
SpreadSheetPlugin
Server OS: Solaris 2.6
Web server: Apache 1.3.12
Perl version: 5.6.1
Client OS: MS Windows 95
MS Windows 2000 Pro
Web Browser: Netscape 4.77
Netscape 6.1
Mozilla 0.9.3
Internet Explorer 5.5 sp2
Amaya 5.1

-- MikeOwens - 20 Aug 2001

Fixed and in TWikiAlphaRelease.

-- PeterThoeny - 21 Aug 2001

Thanks for the quick response.

-- MikeOwens - 23 Aug 2001

Topic revision: r6 - 2001-09-19 - MikeMannix
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.