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>

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: T3581

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).
Schnark created this task.Oct 30 2012, 8:32 AM

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 updated the task description. (Show Details)Apr 13 2015, 12:05 PM
TheDJ set Security to None.
Izno updated the task description. (Show Details)Aug 23 2018, 12:44 PM
Izno removed a subscriber: wikibugs-l-list.