Page MenuHomePhabricator

Parser closing/wrapping a block level element too early, <dl>/<dd> item terminated before <span> in transcluded content has been closed
Closed, ResolvedPublic

Description

"What's the problem?"

ON English Wikisource there is template : https://en.wikisource.org/wiki/Template:Sinogram
which is used to inline using an image an otherwise unsupported character..

The documentation for this contains the following entry:-
": RESULT: {{sinogram|description=⿰火乚|variantof=炸|comment=not in Unicode}}"

The documentation page was showing up on Special:LintErrors ; https://en.wikisource.org/w/index.php?title=Template:Sinogram/doc&action=edit&lintid=529985

So I took the code line into Special:ExpandTemplates

And got the following raw output...:-

<div class="mw-parser-output"><dl><dd> RESULT: <span style="cursor:help;border-bottom:thin dotted red;" title="variant of 炸;not in Unicode"></dd></dl>
<p>⿰火乚
</span>
</p></div>

which is badly formed.

"What was expected?"

The expected behavior was that the Template output was wrapped inside the DD/DL element. and not pushed into it's own <p></p>.

Event Timeline

Aklapper renamed this task from Parser closing/wrapping a block level element too early, (DL/DD) Item terminated before span in transcluded content has been closed. to Parser closing/wrapping a block level element too early, <dl>/<dd> item terminated before <span> in transcluded content has been closed.Jan 23 2018, 1:56 PM
Aklapper added a project: MediaWiki-Parser.
Izno claimed this task.
Izno subscribed.

I fixed the direct issue with the template. This report may be a particular instance of T11996: Multiline HTML elements in lists parsed to broken HTML otherwise, but I'm going to close this one and you can follow that one if desired.