PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Text » Text_Wiki » Bug #3959

XHTML lists not rendered according W3C Standards

Details

Submitted2005-03-25 14:16 UTC
Fromnicknol at gmx dot de
Assignedpmjones
StatusClosed
PackageText_Wiki
PHP Version5.0.3
Roadmaps(Not assigned)

Comments

[2005-03-25 14:16 UTC] nicknol at gmx dot de

Description:
------------
Lists are rendered according the W3C standards if their wiki code begins with 2 newlines.
If the wiki code of the lists starts after only 1 newline the former paragraph is not closed by an end paragraph tag. Instead a line break is inserted and the end paragraph tag comes after the list.

W3C requires the paragraph (a block element) to be closed before starting a list (another block element).
error Message of Validator:
document type does not allow element "ol" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag

<ol>

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

Reproduce code:
---------------
Nummerierte Liste

# eins
# zwei
# drei

Noch eine
* punkt
* zwei punkte
* eingeschoben

Mal gucken was rauskommt

Expected result:
----------------
<p>Nummerierte Liste</p>

<ol>
<li>eins</li>
<li>zwei</li>
<li>drei</li>
</ol>

<p>Noch eine</p>

<ol>

<li>punkt</li>
<li>zwei punkte</li>
<li>eingeschoben</li>
</ol>

<p>Mal gucken was rauskommt</p>

Actual result:
--------------
<p>Nummerierte Liste</p>

<ol>
<li>eins</li>
<li>zwei</li>
<li>drei</li>
</ol>

<p>Unsortiert<br />

<ol>

<li>punkt</li>
<li>zwei punkte</li>
<li>eingeschoben</li>
</ol>

</p>

<p>Mal gucken was rauskommt</p>