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