Page MenuHomePhabricator

";", ":", "#", and "*" are being parsed inside <pre>
Closed, ResolvedPublic

Description

Author: sr.ribeiro

Description:
dt and dd wiki tags (; and :) are being parsed even if they are inside of <pre>

Cheers,


Version: 1.5.x
Severity: normal
URL: http://commons.wikimedia.org/w/index.php?title=User:Get_It/Sandbox&oldid=524017

Details

Reference
bz2857

Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 21 2014, 8:42 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz2857.
bzimport added a subscriber: Unknown Object (MLST).

sr.ribeiro wrote:

(In reply to comment #0)

dt and dd wiki tags (; and :) are being parsed even if they are inside of <pre>

Cheers,

That also goes for lists (* and #).

Cheers,

I also wanted to file these problems

<pre>
#line1
line2
line3
</pre>

is currently not correctly rendered (CVS)

I raised priority, because this will brake hundreds of pages...

I have created a test page showing the rendering errors at
http://en.wikipedia.org/wiki/User:Thryduulf/workspace

for a real-life example see http://tinyurl.com/celev (en:WP:FPC)
(the nominate and support line should be inside the <pre> box

note that as a workaround changing <pre>...</pre> to
<pre><nowiki>...</nowiki></pre> appears to work - see my test
page and the following revision at WP:FPC

just to make it explicit lists using * as well as : or # are also being rendered.

Most probably related to bug 785 fix :/

Reverted part of 785 bug fix. Not sure why I though the part
was useless and deserved to be removed :o)

  • Bug 2887 has been marked as a duplicate of this bug. ***
  • Bug 2932 has been marked as a duplicate of this bug. ***

Comment from dupe bug 2932:

This change:
http://cvs.sourceforge.net/viewcvs.py/wikipedia/phase3/includes/Parser.php?r1=1.476&r2=1.477

is broken.

<pre>

This line starts with a hash.

</pre>

gets rendered as
+-------------------------------------+

1. This line starts with a hash

+-------------------------------------+

jeluf wrote:

Fixed in Parser.php, rev 1.482
Testcases for bug 785 still work fine. Not sure that this will be the final
word, though.