https://bugzilla.wikimedia.org/show_bug.cgi?id=17988

           Summary: Spaces before [[Category:]] link are ignored
           Product: MediaWiki
           Version: unspecified
          Platform: All
               URL: http://test.wikipedia.org/wiki/Typo_in_rtrim
        OS/Version: All
            Status: NEW
          Keywords: easy, need-review, parser, patch
          Severity: trivial
          Priority: Normal
         Component: Page rendering
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Created an attachment (id=5930)
 --> (https://bugzilla.wikimedia.org/attachment.cgi?id=5930)
Two-character fix

Parser.php contains a strange construct (line 1703):
$s = rtrim($s . "\n");

I would guess the added newline is just a waste of time/memory, since it gets
trimmed again immediately. I believe the original author (see r8309) intended
to write a comma instead of a dot.

And indeed, the line should IMHO read
$s = rtrim($s, "\n");
because at the current version, spaces before category links are ignored, so
that wikitext like “Lorem [[Category:Foo]]ipsum]]” ends up showing
“Loremipsum”, not “Lorem ipsum” one might expect (see the attached
URL).

Not that it would be any major bug ;-)


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to