Page MenuHomePhabricator

[[Special:ExpandTemplates]] outputs different html than any page on preview/save as well as in Result & Preview sections
Closed, ResolvedPublic

Description

Special:ExpandTemplates outputs different html than any page on preview/save as well as in Result & Preview sections.

Examples:

code:

<div class="listtest">
* foo
*bar
* baz
*qux
* lorem
*ipsum
</div>

on Special:ExpandTemplates / Preview:

<div class="listtest">
<ul><li> foo
</li><li>bar
</li><li> baz
</li><li>qux
</li><li> lorem
</li><li>ipsum
</li></ul>
</div>

on page preview:

<div class="listtest">
<ul>
<li>foo</li>
<li>bar</li>
<li>baz</li>
<li>qux</li>
<li>lorem</li>
<li>ipsum</li>
</ul>
</div>

(mind the whitespaces which are important for some CSS constructions as well as for some JS)

code:

<table>
<tr>
<th>Header</th>
</tr>
<tr>
<td>foo
bar
baz
qux</td>
</tr>
</table>

on Special:ExpandTemplates / Preview:

<table>
<tr>
<th>Header</th>
</tr>
<tr>
<td>foo
bar
baz
qux</td>
</tr>
</table>

on Special:ExpandTemplates / Result:

<table>
<tr>
<th>Header</th>
</tr>
<tr>
<td>foo
<p>bar
baz
</p>
qux</td>
</tr>
</table>

on page preview:

<table>
<tr>
<th>Header</th>
</tr>
<tr>
<td>foo
<p>bar baz</p>
qux</td>
</tr>
</table>

(mind the <p> tag)


Version: 1.23.0
Severity: normal
URL: https://en.wikipedia.org/wiki/Special:ExpandTemplates?input=%3Cdiv+class%3D%22listtest%22%3E%0A*+foo%0A*bar%0A*+baz%0A*qux%0A*+lorem%0A*ipsum%0A%3C%2Fdiv%3E
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=39617

Details

Reference
bz35806

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:17 AM
bzimport set Reference to bz35806.
bzimport added a subscriber: Unknown Object (MLST).
  • Bug 35822 has been marked as a duplicate of this bug. ***

Looks to me like the HTML preview in ExpandTemplates is not enabling Tidy (though it is enabled on the preprocessor, where it probably has no effect).

matmarex set Security to None.
ssastry claimed this task.
ssastry subscribed.

Now that Tidy is no longer around and RemexHTML is used everywhere, this is no longer an issue.