Page MenuHomePhabricator

HTML output mishmash for <poem> within list item
Closed, DuplicatePublic

Description

Given wikisyntax input

* foo
* bar
* <poem>
loirem
ipsum
dolor
sit
amet
</poem>
* baz
* qux

Expected HTML output (padding by myself to emphasize the structure)

<ul>
  <li>foo</li>
  <li>bar</li>
  <li>
    <div class="poem">
      <p>loirem<br/>
      ipsum<br/>
      dolor<br/>
      sit<br/>
      amet</p>
    </div>
  </li>
  <li>baz</li>
  <li>qux</li>
</ul>

Current HTML output (padding by myself to emphasize the structure)

<ul>
  <li>foo</li>
  <li>bar</li>
  <li>
    <div class="poem"></div>
  </li>
</ul>
<p>loirem<br/>
ipsum<br/>
dolor<br/>
sit<br/>
amet</p>
<ul>
  <li>baz</li>
  <li>qux</li>
</ul>

Applies to # list as well.
Applies to {{#tag:poem}} as well.


Version: 1.23.0
Severity: normal

Details

Reference
bz24569

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:08 PM
bzimport set Reference to bz24569.
bzimport added a subscriber: Unknown Object (MLST).

This is a parser bug, since it also occurs when <poem> in comment 0 is replaced by <div>. (The Poem extension just spits a <div> at the parser.)

GOIII set Security to None.

Fwiw... an input using straight HTML element tags...

<ul>
<li>foo</li>
<li>bar</li>
<li>
<poem>
loirem 
ipsum 
dolor 
sit 
amet 
</poem>
</li>
<li>baz</li>
<li>qux</li>
</ul>

... produces the desired output including the Poem content.

Though a closing </LI> tag is not mandatory per the HTML spec, would always having them applied avert such problems in Wiki mark-up's case?