Last modified: 2011-04-14 20:41:28 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 10781 - Including a Special Page adds a blank line
Including a Special Page adds a blank line
Status: RESOLVED DUPLICATE of bug 12974
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
All All
: Low minor with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
: 14607 23066 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2007-08-02 18:06 UTC by Sergio Gómez
Modified: 2011-04-14 20:41 UTC (History)
9 users (show)

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

patch (1.38 KB, patch)
2010-04-06 14:09 UTC, Conrad Irwin

Description Sergio Gómez 2007-08-02 18:06:27 UTC
When you include a includable Special Page (e.g. {{Special:Example}}), parser adds a blank paragraph with a <br /> at the begining.

This is made in includes/Parser.php line 2170:
$output .= $paragraphStack.'<br />';

I think that it's a bug.

Thank you! ;)
Comment 1 Sergio Gómez 2007-08-02 18:15:47 UTC
Really adds:

<br />
Comment 2 Roan Kattouw 2007-08-02 18:41:26 UTC
I can confirm that, try something like:


(Catrope being my username), which yields:

Comment 3 Rob Church 2007-08-03 22:23:53 UTC
The paragraph is due to the parser, the line break is (of course) coming from the special page inclusion code. Special page output is a block, and it could be considered appropriate to ensure there's a line break after it.

In the case of an edit count, one should use a parser function to obtain the information.
Comment 4 Sergio Gómez 2007-08-07 15:38:31 UTC
I can understand that output is a block. But it adds a blank line when it contains several blocks. 
Comment 5 Greg Ubben 2008-11-05 06:36:39 UTC
The work-around for this used to be:  abc{{padleft:{{Special:Editcount/Catrope}}}}def

Not sure if that still works or is still needed.
Comment 6 PC Johnston 2009-11-18 01:01:22 UTC
This still exists and is particularly annoying with Special:Editcount, the above method using {{padleft:}} doesn't seem to help.
Comment 7 Alexandre Emsenhuber [IAlex] 2010-04-06 14:00:57 UTC
*** Bug 23066 has been marked as a duplicate of this bug. ***
Comment 8 Church of emacs 2010-04-06 14:06:25 UTC
conrad suggested that removing one of the two \n in Parser.php:3082 would solve the problem, however he was unsure if there are any side-effects.
Comment 9 Conrad Irwin 2010-04-06 14:09:06 UTC
Created attachment 7271 [details]

patch, including fixes for parser tests.
Comment 10 DieBuche 2011-04-14 20:14:30 UTC
*** Bug 14607 has been marked as a duplicate of this bug. ***
Comment 11 DieBuche 2011-04-14 20:41:28 UTC

*** This bug has been marked as a duplicate of bug 12974 ***

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