Page MenuHomePhabricator

Leading <br /> in [[Special:Preferences]]
Closed, ResolvedPublic

Description

Author: mediawikibugs

Description:
From includes/SpecialPreferences.php, lines 694-701:

if ($wgAllowRealName || $wgEnableEmail) {
    $wgOut->addHTML("<div class='prefsectiontip'>");
    $rn = $wgAllowRealName ? wfMsg('prefs-help-realname') : '';
    $em = $wgEnableEmail ? '<br />' .  wfMsg('prefs-help-email') : '';
    $wgOut->addHTML( $rn . $em  . '</div>');
}

When $wgAllowRealName is set to false and $wgEnableEmail is set to true, as it
is on (at least to my knowledge) the English Wikipedia and (I know for a fact)
on the Homestar Runner wiki (http://hrwiki.org), the leading <br /> makes the
pink prefsectiontip div look odd.

This occurs in both 1.6.7 and 1.7-svn.


Version: 1.7.x
Severity: minor
URL: http://en.wikipedia.org/wiki/Special:Preferences

Details

Reference
bz6392

Event Timeline

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

dotcom wrote:

adds a variable that enables the '<br />' to only display if both $wgAllowRealName and $wgEnableEmail are set to true

This patch fixes both REL1_6 and 1.7-svn.

Attached:

mediawikibugs wrote:

Patch tested and confirmed to work on both 1.6.7 and 1.7-svn.

robchur wrote:

Fixed in SVN trunk, r14894. Didn't use the supplied patch, but thanks.