Last modified: 2014-10-16 00:16:00 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 17988 - Spaces before [[Category:]] link are ignored
Spaces before [[Category:]] link are ignored
Status: PATCH_TO_REVIEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.21.x
All All
: Low trivial with 3 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
http://test.wikipedia.org/wiki/Typo_i...
: parser, patch, patch-reviewed
: 8381 16882 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-15 10:10 UTC by Mormegil
Modified: 2014-10-16 00:16 UTC (History)
13 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Two-character fix (456 bytes, patch)
2009-03-15 10:10 UTC, Mormegil
Details

Description Mormegil 2009-03-15 10:10:06 UTC
Created attachment 5930 [details]
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 ;-)
Comment 1 Chad H. 2009-03-16 14:34:46 UTC
Cf bug 16882
Comment 2 Karun 2009-05-09 12:35:59 UTC
*** Bug 16882 has been marked as a duplicate of this bug. ***
Comment 3 Dan Jacobson 2009-05-11 22:21:14 UTC
*** Bug 8381 has been marked as a duplicate of this bug. ***
Comment 4 Alexandre Emsenhuber [IAlex] 2009-07-27 19:43:04 UTC
fixed in r53832.
Comment 5 Brion Vibber 2009-09-17 00:58:59 UTC
This caused some pages to go entirely blank... reverted in r56472.

Example self-contained test case (not totally minimized) at http://test.wikipedia.org/wiki/Bug_17988_regression
Comment 6 Siebrand Mazeland 2009-10-18 10:40:15 UTC
Update keywords (-/- easy, reviewed, +need-review)
Comment 7 DieBuche 2011-04-14 17:51:50 UTC
Remove Keyword patch, it obviously didn't work
Comment 8 p858snake 2011-04-30 00:09:53 UTC
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
Comment 9 Sumana Harihareswara 2011-11-09 19:41:04 UTC
Added the "reviewed" keyword since Mormegil received a review of the patch.  Mormegil, do you know whether the bug is still reproducible?
Comment 10 Mormegil 2011-11-09 22:11:51 UTC
(In reply to comment #9)
> Mormegil, do you know whether the bug is still reproducible?

Yes, it is. The URL linked above <http://test.wikipedia.org/wiki/Typo_in_rtrim> leads to a simple reproducible testcase, showing that “Lorem [[Category:Foo]]ipsum” renders as “Loremipsum” (with the Foo category added).
Comment 11 Sumana Harihareswara 2012-10-14 21:19:59 UTC
Still reproducible in master.
Comment 12 Andrey Kiselev 2013-04-04 15:37:05 UTC
Same for whitespace between two links.
Comment 13 Andrey Kiselev 2013-04-04 15:51:03 UTC
When table is not closed.

See http://ru.wikipedia.org/wiki/User:DonRumata/bug

{|
12345 aaaa [[WBC]] [[WBC]] bbb 12345
Comment 14 Aravind K N 2014-01-14 12:00:29 UTC
Is this bug resolved?
Comment 15 Bernard Burette 2014-01-17 06:57:51 UTC
(In reply to comment #14)
> Is this bug resolved?
Hi,

No the bug has not been corrected, I just tested. It is still present in current en.wikipedia.org MediaWiki, version "MediaWiki 1.23wmf10". See link http://test.wikipedia.org/wiki/Typo_in_rtrim for an example.

Regards,
Comment 16 Aravind K N 2014-01-17 12:16:56 UTC
Thanks Bernard. BTW, Are the changes mentioned in comment 1 sufficient for actually fixing this?
Comment 17 Bawolff (Brian Wolff) 2014-01-18 08:30:11 UTC
To avoid confusion:

Steps to reproduce:
*Type the text "Lorem [[Category:Foo]]ipsum" into a wiki page (without quotes)
*Hit save.

Expected output is the two words "Lorem ipsum"

Actual output is a single word "Loremipsum"

The space between "Lorem" and the category tag seems to disappear.
Comment 18 Gerrit Notification Bot 2014-01-18 09:26:42 UTC
Change 108205 had a related patch set uploaded by Arav93:
Put the space before category links to consideration

https://gerrit.wikimedia.org/r/108205

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links