Page MenuHomePhabricator

text on the same line as a comment breaks comment parsing
Closed, ResolvedPublic

Description

Author: gangleri

Description:
Dear friends,

Please take a look at http://pl.wikipedia.org/w/wiki.phtml?
title=Rasy_ps%C3%B3w&action=history and see two versions:

(bież) (poprz) 23:47, 4 paź 2004 217.233.94.166 (Gangleri)
(bież) (poprz) 23:45, 4 paź 2004 217.233.94.166 (Gangleri
de:Hunderasse -> de:Liste der Hunderassen)

The difference between them is only a "carriage return":
The older one contains:
<!--- no category here so far --->[[de:Liste der Hunderassen]]
The newer one contains:
<!--- no category here so far --->
[[de:Liste der Hunderassen]]

I was surprised, that the older version shows only one language
at "in other languages" and the newer seven.

Regards Reinhardt


Version: 1.3.x
Severity: normal
OS: Windows XP
Platform: PC
URL: http://pl.wikipedia.org/w/wiki.phtml?title=Rasy_ps%C3%B3w&action=history

Details

Reference
bz644

Revisions and Commits

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 6:56 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz644.
bzimport added a subscriber: Unknown Object (MLST).

rowan.collins wrote:

The problem appears to be that the other links were sandwiched between two
comments, and the text on the same line as the first confused the parser into
ignoring everything until after the second. A simplified test-case is:

Intro
<!--a comment-->deadly text
invisible text
<!--another comment-->
Outro

or even:

Intro
<!--a comment-->deadly text
invisible text
stray markup-->
Outro

In both cases, the page renders as "Intro Outro", the parser seemingly pairing
the 1st "<!--" with the 2nd "-->"; note that without the second comment there at
all, everything appears as you would expect. However, I notice that this appears
to have been fixed in CVS, in that the test server doesn't show the same
problem: http://test.wikipedia.org/wiki/Comments displays as it should. So
presumably, this will be fixed when 1.4 goes stable, but whether it's severe
enough that the necessary change should be tracked down and backported, I'll
leave to someone else to decide.

1.4 release imminent, resolving as fixed.

epriestley added a commit: Unknown Object (Diffusion Commit).Mar 4 2015, 8:20 AM
epriestley added a commit: Unknown Object (Diffusion Commit).