Page MenuHomePhabricator

Including a Special Page adds a blank line
Closed, DuplicatePublic


Author: sergiogomez

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! ;)

Version: 1.10.x
Severity: minor



Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:50 PM
bzimport set Reference to bz10781.
bzimport added a subscriber: Unknown Object (MLST).

sergiogomez wrote:

Really adds:

<br />

I can confirm that, try something like:


(Catrope being my username), which yields:


robchur wrote:

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.

sergiogomez wrote:

I can understand that output is a block. But it adds a blank line when it contains several blocks.

GregUbben wrote:

The work-around for this used to be: abc{{padleft:{{Special:Editcount/Catrope}}}}def

Not sure if that still works or is still needed.

pcjjenks wrote:

This still exists and is particularly annoying with Special:Editcount, the above method using {{padleft:}} doesn't seem to help.

IAlex added a comment.Apr 6 2010, 2:00 PM
  • Bug 23066 has been marked as a duplicate of this bug. ***
Tobias added a comment.Apr 6 2010, 2:06 PM

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.

conrad.irwin wrote:


patch, including fixes for parser tests.


*** Bug 14607 has been marked as a duplicate of this bug. ***

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