Page MenuHomePhabricator

Sometimes wikisyntax for lists is interpreted inside <pre>
Open, LowPublic

Description

Under some circumstances list syntax is parsed inside <pre> tags. The same happens with <syntaxhighlight> and additionaly causes a terribly mis-nested output. Example input:

<pre>[[a]]
#[[a]]</pre>

----

*<pre>[[a]]
[[a]]</pre>

----

*<pre>[[a]]
#[[a]]</pre>

Output:

<pre>[[a]]
#[[a]]</pre>
<hr>
<ul><li><pre>[[a]]
</pre></li></ul>
[[a]]
<hr>
<ul><li><pre>[[a]]
</pre></li></ul>
<ol><li>[[a]]
</li></ol>
image.png (605×1 px, 10 KB)

No 1 is ok. In No 2 the second line is outside the <pre>, but not parsed as wikisyntax. With <syntaxhighlight> instead of <pre> two additional </div>s appear (unless tidy removes them again). No 3 is like No 2, but the # is interpreted as wikisyntax for <ol>.

See also:

Details

Reference
bz41531

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:55 AM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz41531.
bzimport added a subscriber: Unknown Object (MLST).

Michael: Which MediaWiki version is this about?

(In reply to comment #1)

Michael: Which MediaWiki version is this about?

Probably every, at least 1.21wmf2.

It is also broken with a colon, see bug 22785/bug 1581

TheDJ set Security to None.

This seems to be fixed in Parsoid.