Page MenuHomePhabricator

Unclosed elements in <table> cause wrong escaping
Closed, ResolvedPublic

Description

All cases are tested without Tidy enabled.

Wikitext 1 -- Looks good.

<div style="margin-left: 40%;">
<h1>Welcome!</h1>
<table style="border: 0; width: 100%;"><tr>
<td><ul><li>[[XX]]<li>[[XX]]<li>[[XX]]</ul></td>
<td><ul><li>[[XX]]<li>[[XX]]<li>[[XX]]</ul></td>
<td><ul><li>[[XX]]<li>[[XX]]<li>[[XX]]</ul></td>
<td><ul><li>[[XX]]<li>[[XX]]<li>[[XX]]</ul></td>
</tr></table>
</div>

Wikitext 2 -- </div> will be escaped and <div> will be unclosed.

<div style="margin-left: 40%;">
<h1>Welcome!</h1>
<table style="border: 0; width: 100%;"><tr>
<td><ul><li>[[XX]]<li>[[XX]]<li>[[XX]]</ul>
<td><ul><li>[[XX]]<li>[[XX]]<li>[[XX]]</ul>
<td><ul><li>[[XX]]<li>[[XX]]<li>[[XX]]</ul>
<td><ul><li>[[XX]]<li>[[XX]]<li>[[XX]]</ul>
</table>
</div>

</tr> and </td> are not compulsory here, in HTML (not XHTML).

Details

Reference
bz25792

Event Timeline

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

What possible use case for this is there?

(In reply to comment #1)

What possible use case for this is there?

I was designing a page with the code above when I reported this bug. Users may write this for shorter code, or faster loading speed (without Tidy. See http://code.google.com/intl/en/speed/articles/optimizing-html.html ).

I would like to work on this bug. please assign it to me.

Tony: This is not an easy bug, and I am not sure how much sense this makes long-term, with Parsoid being worked on.

Izno claimed this task.
Izno subscribed.

Remex fixes this issue and as it will be the only way to get output in the near future, resolving this.