coowoole / gwtwiki

Automatically exported from code.google.com/p/gwtwiki
0 stars 0 forks source link

version 3.0.19 renderns invalid html for TOC #147

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. See attached example file.

What is the expected output? What do you see instead?
Properly nested unordered lists (ul) tags. you cannot put a <ul> tag in another 
<ul> tag, you have to put the <ul> tag within an <li> tag.

What version of the product are you using? On what operating system?
3.0.19

Please provide any additional information below.

Using the exmaple file the result html looks liks, which is 

<ul>
    <ul>
        <li class="toclevel-1"><a href="#Title">Title</a></li>
        <ul>
            <li class="toclevel-2"><a href="#Section_1">Section 1</a></li>
            <li class="toclevel-2"><a href="#Section_2">Section 2</a></li>
            <li class="toclevel-2"><a href="#Section_3">Section 3</a></li>
        </ul>
    </ul>
</ul>

however this html is invalid (at least when you are using xhtml1-strict.
The expected output should look like (which is valid):

<ul>
    <li class="toclevel-1"><a href="#Title">Title</a>
        <ul>
            <li class="toclevel-2"><a href="#Section_1">Section 1</a></li>
            <li class="toclevel-2"><a href="#Section_2">Section 2</a></li>
            <li class="toclevel-2"><a href="#Section_3">Section 3</a></li>
        </ul></li>
</ul>

Original issue reported on code.google.com by andreas....@gmail.com on 5 Sep 2013 at 1:17

Attachments:

GoogleCodeExporter commented 8 years ago
Please try the changes in r9058

Original comment by axelclk@gmail.com on 10 Sep 2013 at 9:05

GoogleCodeExporter commented 8 years ago
Hi, i tested revision 9133. Not it is almost correct. The code rendered is now.

<div id="toctitle">
  <h2>Contents</h2>
</div>
<ul>      <------ this needs to be a div
  <ul>
    <li class="toclevel-1"><a href="#DB2_Befehle_und_Probleme">DB2 Befehle und Probleme</a>
      <ul>
        <li class="toclevel-2"><a href="#Befehle">Befehle</a></li>
        ....

The only thing that is not quite correct is the very first ul. Currently the ul 
is enclosed 
in another ul, which is not correct. the only thing that needs to be corrected 
is the first ul.
just replace the very first ul with a div tag, then everything works fine.

expected:

<div id="toctitle">
  <h2>Contents</h2>
</div>
<div>      <------ this needs to be a div
  <ul>
    <li class="toclevel-1"><a href="#DB2_Befehle_und_Probleme">DB2 Befehle und Probleme</a>
      <ul>
        <li class="toclevel-2"><a href="#Befehle">Befehle</a></li>
        ....

Original comment by andreas....@gmail.com on 23 Jan 2014 at 2:59