Page MenuHomePhabricator

DIV inside list syntax does not generate same code as <DIV> inside <DL><DD> directly.
Closed, DuplicatePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • On English Wikisource - Using Special: ExpandTemplates.
  • Enter
:{{TOC page listing|'''{{Larger|Division 1—Short title and commencement}}'''|1}}

<dl><dd>{{TOC page listing|'''{{Larger|Division 1—Short title and commencement}}'''|1}}</dd></dl>
  • and compare the generated HTML.

What happens?:

The raw HTML code generated is not identical, with the parser terminating the definition list early, leading to unpaired DIV tags (which is malformed).

What should have happened instead?:

The raw generated HTML code should have been identical. (This is a long standing glitch that has existed for over a decade!)..

Event Timeline

For reference the HTML generated output -
<div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><dl><dd><style data-mw-deduplicate="TemplateStyles:r14324469">.mw-parser-output .wst-tpl{width:100%;position:relative}.mw-parser-output .wst-tpl-entry-outer{max-width:80%;text-align:left;text-indent:0;padding-left:0}.mw-parser-output .wst-tpl-entry-inner{position:relative;display:inline;text-align:left;padding-right:0.5em;background:white;color:#202122;z-index:1}.mw-parser-output .wst-tpl-pagenum{display:inline;position:absolute;bottom:0px;right:0px;text-align:right;min-width:2em;background:white;color:#202122;z-index:1}</style><div class="wst-tpl"></div></dd></dl>
<div class="wst-tpl-entry-outer"><div class="wst-tpl-entry-inner" style="color:inherit;"><b><span style="font-size: 120%;">Division 1—Short title and commencement</span></b></div></div>
<div class="wst-tpl-pagenum" style="color:inherit;">1</div>

<dl><dd><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r14324469"><div class="wst-tpl">
<div class="wst-tpl-entry-outer"><div class="wst-tpl-entry-inner" style="color:inherit;"><b><span style="font-size: 120%;">Division 1—Short title and commencement</span></b></div></div>
<div class="wst-tpl-pagenum" style="color:inherit;">1</div>
</div></dd></dl></div>