Page MenuHomePhabricator

Lists in multiple columns have improper HTML
Closed, InvalidPublic

Description

Author: boydb

Description:
When creating an inline query with SMW, if using the "format" of "ul" or "ol", with "columns" set to a number higher than "1", the HTML code breaks. For example:

{{#ask:[[Class::MyClass]]

|format=ul
|columns=3

}}

Produces lists that look like:

<ul><div style="float: left; width: 25%">
<li><a href="/wiki/index.php/MyPage" title="MyPage">MyPage</a>&lt;/li&gt;
<li><a href="/wiki/index.php/MyPage" title="MyPage">MyPage</a>&lt;/li&gt;
<li><a href="/wiki/index.php/MyPage" title="MyPage">MyPage</a>&lt;/li&gt;
<li><a href="/wiki/index.php/MyPage" title="MyPage">MyPage</a>&lt;/li&gt;

</div><div style="float: left; width: 25%">
<li><a href="/wiki/index.php/MyPage" title="MyPage">MyPage</a>&lt;/li&gt;
<li><a href="/wiki/index.php/MyPage" title="MyPage">MyPage</a>&lt;/li&gt;
<li><a href="/wiki/index.php/MyPage" title="MyPage">MyPage</a>&lt;/li&gt;
<li><a href="/wiki/index.php/MyPage" title="MyPage">MyPage</a>&lt;/li&gt;

</div><div style="float: left; width: 25%">
<li><a href="/wiki/index.php/MyPage" title="MyPage">MyPage</a>&lt;/li&gt;
<li><a href="/wiki/index.php/MyPage" title="MyPage">MyPage</a>&lt;/li&gt;
<li><a href="/wiki/index.php/MyPage" title="MyPage">MyPage</a>&lt;/li&gt;
<li><a href="/wiki/index.php/MyPage" title="MyPage">MyPage</a>&lt;/li&gt;
</div>
</ul><br style="clear: both" />

As you can see, the closing "</li>" tags are not interpreted as a proper ending of a list element, which may be because the "<ul>" tags are outside the "<div>" tags breaking up the list.


Version: unspecified
Severity: minor

Details

Reference
bz24105

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:02 PM
bzimport set Reference to bz24105.

boydb wrote:

Proposed fix to extensions/SemanticMediaWiki/includes/SMW_QP_List.php

Attached:

Unknown Object (User) added a comment.Feb 11 2014, 1:26 AM

This no longer seems to be an issue with SMW 1.9.1.