From 74a21f3bd1692dac958ddf3e09226a72b7bc65b7 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Sun, 30 May 2010 17:33:59 +0000 Subject: [PATCH] Remove most named character references from output MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Recommit of r66254 to trunk. This was just find extensions phase3 -iname '*.php' \! -iname '*.i18n.php' \! -iname 'Messages*.php' \! -iname '*_Messages.php' -exec sed -i 's/ /\ /g;s/—/―/g;s/•/•/g;s/á/á/g;s/´/´/g;s/à/à/g;s/α/α/g;s/ä/ä/g;s/ç/ç/g;s/©/©/g;s/↓/↓/g;s/°/°/g;s/é/é/g;s/ê/ê/g;s/ë/ë/g;s/è/è/g;s/€/€/g;s/↔//g;s/…/…/g;s/í/í/g;s/ì/ì/g;s/←/←/g;s/“/“/g;s/·/·/g;s/−/−/g;s/–/–/g;s/ó/ó/g;s/ô/ô/g;s/œ/œ/g;s/ò/ò/g;s/õ/õ/g;s/ö/ö/g;s/£/£/g;s/′/′/g;s/″/″/g;s/»/»/g;s/→/→/g;s/”/”/g;s/Σ/Σ/g;s/×/×/g;s/ú/ú/g;s/↑/↑/g;s/ü/ü/g;s/¥/Â¥/g' {} + followed by reading over every single line of the resulting diff and fixing a whole bunch of false positives. The reason for this change is given in . I cleared it with Tim and Brion on IRC before committing. It might cause a few problems, but I tried to be careful; please report any issues. I skipped all messages files. I plan to make a follow-up commit that alters wfMsgExt() with 'escapenoentities' to sanitize all the entities. That way, the only messages that will be problems will be ones that output raw HTML, and we want to get rid of those anyway. This should get rid of all named entities everywhere except messages. I skipped a few things like   that I noticed in manual inspection, because they weren't well-formed XML anyway. Also, to everyone who uses non-breaking spaces when they could use a normal space, or nothing at all, or CSS padding: I still hate you. Die. --- config/Installer.php | 4 ++-- includes/Article.php | 2 +- includes/ChangeTags.php | 2 +- includes/ChangesList.php | 22 +++++++++--------- includes/EditPage.php | 4 ++-- includes/GlobalFunctions.php | 2 +- includes/HTMLForm.php | 10 ++++---- includes/HistoryPage.php | 4 ++-- includes/LogEventsList.php | 2 +- includes/MessageCache.php | 1 + includes/Pager.php | 6 ++--- includes/Preferences.php | 6 ++--- includes/Sanitizer.php | 2 +- includes/Skin.php | 4 ++-- includes/Xml.php | 8 +++---- includes/diff/DifferenceEngine.php | 8 +++---- includes/diff/DifferenceInterface.php | 6 ++--- includes/installer/WebInstaller.php | 8 +++---- includes/parser/Parser.php | 8 +++---- includes/specials/SpecialAllmessages.php | 2 +- includes/specials/SpecialBlockip.php | 16 ++++++------- includes/specials/SpecialBooksources.php | 2 +- includes/specials/SpecialContributions.php | 2 +- includes/specials/SpecialExport.php | 4 ++-- includes/specials/SpecialIpblocklist.php | 4 ++-- includes/specials/SpecialListusers.php | 2 +- includes/specials/SpecialLockdb.php | 2 +- includes/specials/SpecialMergeHistory.php | 2 +- includes/specials/SpecialMovepage.php | 4 ++-- includes/specials/SpecialProtectedpages.php | 24 ++++++++++---------- includes/specials/SpecialProtectedtitles.php | 12 +++++----- includes/specials/SpecialUndelete.php | 4 ++-- includes/specials/SpecialUnlockdb.php | 2 +- includes/specials/SpecialUpload.php | 2 +- includes/specials/SpecialWatchlist.php | 6 ++--- includes/specials/SpecialWhatlinkshere.php | 2 +- includes/templates/Userlogin.php | 2 +- languages/Language.php | 2 +- profileinfo.php | 2 +- skins/MonoBook.php | 4 ++-- skins/Vector.php | 2 +- 41 files changed, 107 insertions(+), 106 deletions(-) diff --git a/config/Installer.php b/config/Installer.php index 069d806861..66190dda38 100644 --- a/config/Installer.php +++ b/config/Installer.php @@ -1582,7 +1582,7 @@ if( count( $errs ) ) {
checked="checked" /> -   +  
@@ -1689,7 +1689,7 @@ if( count( $errs ) ) {
- +
diff --git a/includes/Article.php b/includes/Article.php index aa5a997e5d..5b56bd4633 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1562,7 +1562,7 @@ class Article { $imageDir = $wgContLang->getDir(); $imageUrl = $wgStylePath . '/common/images/redirect' . $imageDir . '.png'; $imageUrl2 = $wgStylePath . '/common/images/nextredirect' . $imageDir . '.png'; - $alt2 = $wgContLang->isRTL() ? '←' : '→'; // should -> and <- be used instead of entities? + $alt2 = $wgContLang->isRTL() ? '←' : '→'; // should -> and <- be used instead of Unicode? if ( $appendSubtitle ) { $wgOut->appendSubtitle( wfMsgHtml( 'redirectpagesub' ) ); diff --git a/includes/ChangeTags.php b/includes/ChangeTags.php index 8dce679b19..3589560b6e 100644 --- a/includes/ChangeTags.php +++ b/includes/ChangeTags.php @@ -168,7 +168,7 @@ class ChangeTags { return $data; } - $html = implode( ' ', $data ); + $html = implode( ' ', $data ); $html .= "\n" . Xml::element( 'input', array( 'type' => 'submit', 'value' => wfMsg( 'tag-filter-submit' ) ) ); $html .= "\n" . Xml::hidden( 'title', $wgTitle-> getPrefixedText() ); $html = Xml::tags( 'form', array( 'action' => $wgTitle->getLocalURL(), 'method' => 'get' ), $html ); diff --git a/includes/ChangesList.php b/includes/ChangesList.php index 442d011106..fe75bf0b37 100644 --- a/includes/ChangesList.php +++ b/includes/ChangesList.php @@ -87,7 +87,7 @@ class ChangesList { * @param $bot Boolean * @return String */ - protected function recentChangesFlags( $new, $minor, $patrolled, $nothing = ' ', $bot = false ) { + protected function recentChangesFlags( $new, $minor, $patrolled, $nothing = ' ', $bot = false ) { $f = $new ? self::flag( 'newpage' ) : $nothing; $f .= $minor ? self::flag( 'minor' ) : $nothing; $f .= $bot ? self::flag( 'bot' ) : $nothing; @@ -843,13 +843,13 @@ class EnhancedChangesList extends ChangesList { $tl = ""; $tl .= ""; - $r .= ''.$tl.' '; + $r .= ''.$tl.' '; # Main line - $r .= $this->recentChangesFlags( $isnew, false, $unpatrolled, ' ', $bot ); + $r .= $this->recentChangesFlags( $isnew, false, $unpatrolled, ' ', $bot ); # Timestamp - $r .= ' '.$block[0]->timestamp.' '; + $r .= ' '.$block[0]->timestamp.' '; # Article link if( $namehidden ) { @@ -953,8 +953,8 @@ class EnhancedChangesList extends ChangesList { #$r .= ''.$this->spacerArrow(); $r .= ''; $r .= $this->spacerIndent() . $this->spacerIndent(); - $r .= $this->recentChangesFlags( $rc_new, $rc_minor, $rcObj->unpatrolled, ' ', $rc_bot ); - $r .= ' '; + $r .= $this->recentChangesFlags( $rc_new, $rc_minor, $rcObj->unpatrolled, ' ', $rc_bot ); + $r .= ' '; $params = $queryParams; @@ -1069,7 +1069,7 @@ class EnhancedChangesList extends ChangesList { * @return String: HTML tag */ protected function spacerIndent() { - return '     '; + return '     '; } /** @@ -1089,14 +1089,14 @@ class EnhancedChangesList extends ChangesList { $query['curid'] = $rc_cur_id; $r = ''; - $r .= '\n"; + $s .= "\n"; } elseif ( $this->isFieldSortable( $field ) ) { $query = array( 'sort' => $field, 'limit' => $this->mLimit ); if ( $field == $this->mSort ) { @@ -870,7 +870,7 @@ abstract class TablePager extends IndexPager { $value = isset( $row->$field ) ? $row->$field : null; $formatted = strval( $this->formatValue( $field, $value ) ); if ( $formatted == '' ) { - $formatted = ' '; + $formatted = ' '; } $s .= Xml::tags( 'td', $this->getCellAttrs( $field, $value ), $formatted ); } @@ -1061,7 +1061,7 @@ abstract class TablePager extends IndexPager { /** * Format a table cell. The return value should be HTML, but use an empty - * string not   for empty cells. Do not include the . + * string not   for empty cells. Do not include the . * * The current result row is available as $this->mCurrentRow, in case you * need more context. diff --git a/includes/Preferences.php b/includes/Preferences.php index 502af4ea0d..802db5acb3 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -436,7 +436,7 @@ class Preferences { $defaultPreferences['skin'] = array( 'type' => 'radio', 'options' => self::generateSkinOptions( $user ), - 'label' => ' ', + 'label' => ' ', 'section' => 'rendering/skin', ); @@ -488,7 +488,7 @@ class Preferences { $defaultPreferences['math'] = array( 'type' => 'radio', 'options' => array_flip( array_map( 'wfMsgHtml', $wgLang->getMathNames() ) ), - 'label' => ' ', + 'label' => ' ', 'section' => 'rendering/math', ); } @@ -519,7 +519,7 @@ class Preferences { $defaultPreferences['date'] = array( 'type' => 'radio', 'options' => $dateOptions, - 'label' => ' ', + 'label' => ' ', 'section' => 'datetime/dateformat', ); } diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php index dd9318ccf2..b422c4e4bb 100644 --- a/includes/Sanitizer.php +++ b/includes/Sanitizer.php @@ -966,7 +966,7 @@ class Sanitizer { /** * Given HTML input, escape with htmlspecialchars but un-escape entites. - * This allows (generally harmless) entities like   to survive. + * This allows (generally harmless) entities like   to survive. * * @param $html String to escape * @return String: escaped input diff --git a/includes/Skin.php b/includes/Skin.php index 605b2c493f..0140d8696c 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -875,7 +875,7 @@ CSS; } function getQuickbarCompensator( $rows = 1 ) { - return ""; + return ""; } /** @@ -1275,7 +1275,7 @@ CSS; . ''; if( $wgUseTwoButtonsSearchForm ) { - $s .= ' \n"; + $s .= ' \n"; } else { $s .= ' \n"; } diff --git a/includes/Xml.php b/includes/Xml.php index a20c6ca6a0..d3dc5ab5a3 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -147,7 +147,7 @@ class Xml { . "\n" . Xml::closeElement( 'select' ); if ( !is_null( $label ) ) { - $ret = Xml::label( $label, $element_name ) . ' ' . $ret; + $ret = Xml::label( $label, $element_name ) . ' ' . $ret; } return $ret; } @@ -368,7 +368,7 @@ class Xml { */ public static function inputLabel( $label, $name, $id, $size=false, $value=false, $attribs=array() ) { list( $label, $input ) = self::inputLabelSep( $label, $name, $id, $size, $value, $attribs ); - return $label . ' ' . $input; + return $label . ' ' . $input; } /** @@ -387,7 +387,7 @@ class Xml { */ public static function checkLabel( $label, $name, $id, $checked=false, $attribs=array() ) { return self::check( $name, $checked, array( 'id' => $id ) + $attribs ) . - ' ' . + ' ' . self::label( $label, $id, $attribs ); } @@ -397,7 +397,7 @@ class Xml { */ public static function radioLabel( $label, $name, $value, $id, $checked=false, $attribs=array() ) { return self::radio( $name, $value, $checked, array( 'id' => $id ) + $attribs ) . - ' ' . + ' ' . self::label( $label, $id, $attribs ); } diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index b13c726369..3364531243 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -1141,9 +1141,9 @@ class TableDiffFormatter extends DiffFormatter { } public static function escapeWhiteSpace( $msg ) { - $msg = preg_replace( '/^ /m', '  ', $msg ); - $msg = preg_replace( '/ $/m', '  ', $msg ); - $msg = preg_replace( '/ /', '  ', $msg ); + $msg = preg_replace( '/^ /m', '  ', $msg ); + $msg = preg_replace( '/ $/m', '  ', $msg ); + $msg = preg_replace( '/ /', '  ', $msg ); return $msg; } @@ -1187,7 +1187,7 @@ class TableDiffFormatter extends DiffFormatter { } function emptyLine() { - return ''; + return ''; } function _added( $lines ) { diff --git a/includes/diff/DifferenceInterface.php b/includes/diff/DifferenceInterface.php index ed256e964c..3ec9d40d9d 100644 --- a/includes/diff/DifferenceInterface.php +++ b/includes/diff/DifferenceInterface.php @@ -199,7 +199,7 @@ CONTROL; // Check if page is editable $editable = $this->mNewRev->getTitle()->userCan( 'edit' ); if ( $editable && $this->mNewRev->isCurrent() && $wgUser->isAllowed( 'rollback' ) ) { - $rollback = '   ' . $sk->generateRollback( $this->mNewRev ); + $rollback = '   ' . $sk->generateRollback( $this->mNewRev ); } else { $rollback = ''; } @@ -286,7 +286,7 @@ CONTROL; $query['oldid'] = $this->mNewid; # Skip next link on the top revision if( $this->mNewRev->isCurrent() ) { - $nextlink = ' '; + $nextlink = ' '; } else { $nextlink = $sk->link( $this->mTitle, @@ -401,7 +401,7 @@ CONTROL; $link = $sk->revDeleteLink( $query, $rev->isDeleted( Revision::DELETED_RESTRICTED ), $canHide ); } - $link = '   ' . $link . ' '; + $link = '   ' . $link . ' '; } return $link; } diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index 0edd7350d2..44c5b528d2 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -550,7 +550,7 @@ class WebInstaller extends Installer { */ function label( $msg, $forId, $contents ) { if ( strval( $msg ) == '' ) { - $labelText = ' '; + $labelText = ' '; } else { $labelText = wfMsgHtml( $msg ); } @@ -717,7 +717,7 @@ class WebInstaller extends Installer { $s .= '
  • ' . Xml::radio( $params['controlName'], $value, $checked, $itemAttribs ) . - ' ' . + ' ' . Xml::tags( 'label', array( 'for' => $id ), $this->parse( wfMsgNoTrans( $params['itemLabelPrefix'] . strtolower( $value ) ) ) ) . @@ -1492,7 +1492,7 @@ class WebInstaller_Options extends WebInstallerPage { return '

    '. Xml::element( 'img', array( 'src' => $this->getVar( 'wgRightsIcon' ) ) ) . - '  ' . + '  ' . htmlspecialchars( $this->getVar( 'wgRightsText' ) ) . "

    \n" . "

    " . @@ -1725,6 +1725,6 @@ class WebInstaller_Copying extends WebInstaller_Document { } private static function replaceLeadingSpaces( $matches ) { - return "\n" . str_repeat( ' ', strlen( $matches[0] ) ); + return "\n" . str_repeat( ' ', strlen( $matches[0] ) ); } } diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index cd32813e5a..63b3b41f49 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -333,10 +333,10 @@ class Parser { $fixtags = array( # french spaces, last one Guillemet-left # only if there is something before the space - '/(.) (?=\\?|:|;|!|%|\\302\\273)/' => '\\1 \\2', + '/(.) (?=\\?|:|;|!|%|\\302\\273)/' => '\\1 \\2', # french spaces, Guillemet-right - '/(\\302\\253) /' => '\\1 ', - '/ (!\s*important)/' => ' \\1', # Beware of CSS magic word !important, bug #11874. + '/(\\302\\253) /' => '\\1 ', + '/ (!\s*important)/' => ' \\1', # Beware of CSS magic word !important, bug #11874. ); $text = preg_replace( array_keys( $fixtags ), array_values( $fixtags ), $text ); @@ -1366,7 +1366,7 @@ class Parser { # Use the encoded URL # This means that users can paste URLs directly into the text - # Funny characters like ö aren't valid in URLs anyway + # Funny characters like ö aren't valid in URLs anyway # This was changed in August 2004 $s .= $sk->makeExternalLink( $url, $text, false, $linktype, $this->getExternalLinkAttribs( $url ) ) . $dtrail . $trail; diff --git a/includes/specials/SpecialAllmessages.php b/includes/specials/SpecialAllmessages.php index 57debc0a19..3c92292117 100644 --- a/includes/specials/SpecialAllmessages.php +++ b/includes/specials/SpecialAllmessages.php @@ -327,7 +327,7 @@ class AllmessagesTablePager extends TablePager { $s .= Xml::openElement( 'tr', $this->getRowAttrs( $row, true ) ); $formatted = strval( $this->formatValue( 'am_actual', $row->am_actual ) ); if ( $formatted == '' ) { - $formatted = ' '; + $formatted = ' '; } $s .= Xml::tags( 'td', $this->getCellAttrs( 'am_actual', $row->am_actual ), $formatted ) . "

  • \n"; diff --git a/includes/specials/SpecialBlockip.php b/includes/specials/SpecialBlockip.php index 8acc9b5759..c04502dfdb 100644 --- a/includes/specials/SpecialBlockip.php +++ b/includes/specials/SpecialBlockip.php @@ -250,7 +250,7 @@ class IPBlockForm { - + - + - + - + - + - + - + - + - + @@ -382,7 +382,7 @@ class IPUnblockForm { Xml::openElement( 'fieldset' ) . Xml::element( 'legend', null, wfMsg( 'ipblocklist-legend' ) ) . Xml::inputLabel( wfMsg( 'ipblocklist-username' ), 'ip', 'ip', /* size */ false, $this->ip ) . - ' ' . + ' ' . Xml::submitButton( wfMsg( 'ipblocklist-submit' ) ) . '
    ' . $hl . Xml::closeElement( 'fieldset' ) diff --git a/includes/specials/SpecialListusers.php b/includes/specials/SpecialListusers.php index 0ccd44bf51..6c142ac21d 100644 --- a/includes/specials/SpecialListusers.php +++ b/includes/specials/SpecialListusers.php @@ -198,7 +198,7 @@ class UsersPager extends AlphabeticPager { $out .= Xml::option( $groupText, $group, $group == $this->requestedGroup ); $out .= Xml::closeElement( 'select' ) . '
    '; $out .= Xml::checkLabel( wfMsg('listusers-editsonly'), 'editsOnly', 'editsOnly', $this->editsOnly ); - $out .= ' '; + $out .= ' '; $out .= Xml::checkLabel( wfMsg('listusers-creationsort'), 'creationSort', 'creationSort', $this->creationSort ); $out .= '
    '; diff --git a/includes/specials/SpecialLockdb.php b/includes/specials/SpecialLockdb.php index 8c701dd60b..6edd4caa45 100644 --- a/includes/specials/SpecialLockdb.php +++ b/includes/specials/SpecialLockdb.php @@ -77,7 +77,7 @@ class DBLockForm { - + diff --git a/includes/specials/SpecialMergeHistory.php b/includes/specials/SpecialMergeHistory.php index 275690a750..95464a04c4 100644 --- a/includes/specials/SpecialMergeHistory.php +++ b/includes/specials/SpecialMergeHistory.php @@ -174,7 +174,7 @@ class SpecialMergeHistory extends SpecialPage { " - + diff --git a/includes/specials/SpecialMovepage.php b/includes/specials/SpecialMovepage.php index 9b480bbcb0..4bca88eab8 100644 --- a/includes/specials/SpecialMovepage.php +++ b/includes/specials/SpecialMovepage.php @@ -277,7 +277,7 @@ class MovePageForm { # move and we aren't moving the talk page. $this->moveSubpages && ($this->oldTitle->hasSubpages() || $this->moveTalk), array( 'id' => 'wpMovesubpages' ) - ) . ' ' . + ) . ' ' . Xml::tags( 'label', array( 'for' => 'wpMovesubpages' ), wfMsgExt( ( $this->oldTitle->hasSubpages() @@ -310,7 +310,7 @@ class MovePageForm { $wgOut->addHTML( " {$confirm} - + diff --git a/includes/specials/SpecialProtectedpages.php b/includes/specials/SpecialProtectedpages.php index 61a82cf505..59a34e545d 100644 --- a/includes/specials/SpecialProtectedpages.php +++ b/includes/specials/SpecialProtectedpages.php @@ -139,16 +139,16 @@ class ProtectedPagesForm { Xml::openElement( 'fieldset' ) . Xml::element( 'legend', array(), wfMsg( 'protectedpages' ) ) . Xml::hidden( 'title', $title->getPrefixedDBkey() ) . "\n" . - $this->getNamespaceMenu( $namespace ) . " \n" . - $this->getTypeMenu( $type ) . " \n" . - $this->getLevelMenu( $level ) . " \n" . + $this->getNamespaceMenu( $namespace ) . " \n" . + $this->getTypeMenu( $type ) . " \n" . + $this->getLevelMenu( $level ) . " \n" . "
    " . - $this->getExpiryCheck( $indefOnly ) . " \n" . - $this->getCascadeCheck( $cascadeOnly ) . " \n" . + $this->getExpiryCheck( $indefOnly ) . " \n" . + $this->getCascadeCheck( $cascadeOnly ) . " \n" . "
    " . - $this->getSizeLimit( $sizetype, $size ) . " \n" . + $this->getSizeLimit( $sizetype, $size ) . " \n" . "" . - " " . Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . "\n" . + " " . Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . "\n" . Xml::closeElement( 'fieldset' ) . Xml::closeElement( 'form' ); } @@ -162,7 +162,7 @@ class ProtectedPagesForm { */ protected function getNamespaceMenu( $namespace = null ) { return "" . - Xml::label( wfMsg( 'namespace' ), 'namespace' ) . ' ' + Xml::label( wfMsg( 'namespace' ), 'namespace' ) . ' ' . Xml::namespaceSelector( $namespace, '' ) . ""; } @@ -190,11 +190,11 @@ class ProtectedPagesForm { return Xml::radioLabel( wfMsg('minimum-size'), 'sizetype', 'min', 'wpmin', !$max ) . - ' ' . + ' ' . Xml::radioLabel( wfMsg('maximum-size'), 'sizetype', 'max', 'wpmax', $max ) . - ' ' . + ' ' . Xml::input( 'size', 9, $size, array( 'id' => 'wpsize' ) ) . - ' ' . + ' ' . Xml::label( wfMsg('pagesize'), 'wpsize' ); } @@ -222,7 +222,7 @@ class ProtectedPagesForm { } return "" . - Xml::label( wfMsg('restriction-type') , $this->IdType ) . ' ' . + Xml::label( wfMsg('restriction-type') , $this->IdType ) . ' ' . Xml::tags( 'select', array( 'id' => $this->IdType, 'name' => $this->IdType ), implode( "\n", $options ) ) . ""; diff --git a/includes/specials/SpecialProtectedtitles.php b/includes/specials/SpecialProtectedtitles.php index 19a490cc37..f6608fbf40 100644 --- a/includes/specials/SpecialProtectedtitles.php +++ b/includes/specials/SpecialProtectedtitles.php @@ -100,10 +100,10 @@ class ProtectedTitlesForm { return "\n" . '
    ' . Xml::element( 'legend', array(), wfMsg( 'protectedtitles' ) ) . - Xml::hidden( 'title', $special ) . " \n" . - $this->getNamespaceMenu( $namespace ) . " \n" . - $this->getLevelMenu( $level ) . " \n" . - " " . Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . "\n" . + Xml::hidden( 'title', $special ) . " \n" . + $this->getNamespaceMenu( $namespace ) . " \n" . + $this->getLevelMenu( $level ) . " \n" . + " " . Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . "\n" . "
    "; } @@ -116,7 +116,7 @@ class ProtectedTitlesForm { */ function getNamespaceMenu( $namespace = null ) { return Xml::label( wfMsg( 'namespace' ), 'namespace' ) - . ' ' + . ' ' . Xml::namespaceSelector( $namespace, '' ); } @@ -148,7 +148,7 @@ class ProtectedTitlesForm { } return - Xml::label( wfMsg('restriction-level') , $this->IdLevel ) . ' ' . + Xml::label( wfMsg('restriction-level') , $this->IdLevel ) . ' ' . Xml::tags( 'select', array( 'id' => $this->IdLevel, 'name' => $this->IdLevel ), implode( "\n", $options ) ); diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index 87c1921fee..4e5578dfe8 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -1070,7 +1070,7 @@ class UndeleteForm { if( $wgUser->isAllowed( 'suppressrevision' ) ) { $unsuppressBox = " - + - + - + diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index cba2851cd9..dee0301663 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -675,7 +675,7 @@ class SpecialUpload extends SpecialPage { // if there isn't an exact match... $file = wfLocalFile( $filename ); } - $s = ' '; + $s = ' '; if ( $file ) { $exists = UploadBase::getExistsWarning( $file ); $warning = self::getExistsWarning( $exists ); diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 562715f4f8..152970d132 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -296,9 +296,9 @@ function wfSpecialWatchlist( $par ) { $form .= $wgLang->pipeList( $links ); $form .= Xml::openElement( 'form', array( 'method' => 'post', 'action' => $thisTitle->getLocalUrl(), 'id' => 'mw-watchlist-form-namespaceselector' ) ); $form .= '

    '; - $form .= Xml::label( wfMsg( 'namespace' ), 'namespace' ) . ' '; - $form .= Xml::namespaceSelector( $nameSpace, '' ) . ' '; - $form .= Xml::checkLabel( wfMsg('invert'), 'invert', 'nsinvert', $invert ) . ' '; + $form .= Xml::label( wfMsg( 'namespace' ), 'namespace' ) . ' '; + $form .= Xml::namespaceSelector( $nameSpace, '' ) . ' '; + $form .= Xml::checkLabel( wfMsg('invert'), 'invert', 'nsinvert', $invert ) . ' '; $form .= Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . '

    '; $form .= Xml::hidden( 'days', $days ); if( $hideMinor ) diff --git a/includes/specials/SpecialWhatlinkshere.php b/includes/specials/SpecialWhatlinkshere.php index b63c0eee2a..7af8ac8182 100644 --- a/includes/specials/SpecialWhatlinkshere.php +++ b/includes/specials/SpecialWhatlinkshere.php @@ -382,7 +382,7 @@ class SpecialWhatLinksHere extends SpecialPage { $f .= ' '; # Namespace selector - $f .= Xml::label( wfMsg( 'namespace' ), 'namespace' ) . ' ' . + $f .= Xml::label( wfMsg( 'namespace' ), 'namespace' ) . ' ' . Xml::namespaceSelector( $namespace, '' ); $f .= ' '; diff --git a/includes/templates/Userlogin.php b/includes/templates/Userlogin.php index 60f3376782..8989bc1afa 100644 --- a/includes/templates/Userlogin.php +++ b/includes/templates/Userlogin.php @@ -100,7 +100,7 @@ class UserloginTemplate extends QuickTemplate { 'tabindex' => '5' ) ); if ( $this->data['useemail'] && $this->data['canreset'] ) { - echo ' '; + echo ' '; echo Html::input( 'wpMailmypassword', wfMsg( 'mailmypassword' ), 'submit', array( 'id' => 'wpMailmypassword', 'tabindex' => '6' diff --git a/languages/Language.php b/languages/Language.php index 05ad66b17d..7eeb6fad97 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -2410,7 +2410,7 @@ class Language { } } else { if ( $ch == '&' ) { - $entityState = 1; // entity found, (e.g. " ") + $entityState = 1; // entity found, (e.g. " ") } else { $displayLen++; // this char is displayed // Add on the other display text after this... diff --git a/profileinfo.php b/profileinfo.php index afc05eb5c0..cd324f9e7a 100644 --- a/profileinfo.php +++ b/profileinfo.php @@ -111,7 +111,7 @@ class profile_point { if ( $name != $this->name() ) $e += array( $name => $ep ); - $extet = " [–]"; + $extet = " [–]"; } ?> diff --git a/skins/MonoBook.php b/skins/MonoBook.php index 061e97db12..bfe9b41337 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -229,7 +229,7 @@ if($this->data['copyrightico']) { ?> 'accesskey' => $this->skin->accesskey( 'search' ) ) ); ?> - skin->tooltipAndAccesskey( 'search-go' ); ?> />  + skin->tooltipAndAccesskey( 'search-go' ); ?> />  skin->tooltipAndAccesskey( 'search-fulltext' ); ?> />
    @@ -267,7 +267,7 @@ if($this->data['copyrightico']) { ?> if($this->data['feeds']) { ?>
    skin->tooltipAndAccesskey( 'search' ); ?> data['search'] ) ): ?> value="text( 'search' ) ?>" /> - +
    skin->tooltipAndAccesskey( 'search' ); ?> data['search'] ) ): ?> value="text( 'search' ) ?>" /> -- 2.20.1
    ' . $this->spacerArrow() . ' '; + $r .= '' . $this->spacerArrow() . ' '; # Flag and Timestamp if( $rc_type == RC_MOVE || $rc_type == RC_MOVE_OVER_REDIRECT ) { - $r .= '    '; // 4 flags -> 4 spaces + $r .= '    '; // 4 flags -> 4 spaces } else { - $r .= $this->recentChangesFlags( $rc_type == RC_NEW, $rc_minor, $rcObj->unpatrolled, ' ', $rc_bot ); + $r .= $this->recentChangesFlags( $rc_type == RC_NEW, $rc_minor, $rcObj->unpatrolled, ' ', $rc_bot ); } - $r .= ' '.$rcObj->timestamp.' '; + $r .= ' '.$rcObj->timestamp.' '; # Article or log link if( $rc_log_type ) { $logtitle = Title::newFromText( "Log/$rc_log_type", NS_SPECIAL ); diff --git a/includes/EditPage.php b/includes/EditPage.php index 1b91fe0d2f..c909f49bb2 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -2280,7 +2280,7 @@ INPUTS ); $checkboxes['minor'] = Xml::check( 'wpMinoredit', $checked['minor'], $attribs ) . - " "; + " "; } $watchLabel = wfMsgExt( 'watchthis', array( 'parseinline' ) ); @@ -2293,7 +2293,7 @@ INPUTS ); $checkboxes['watch'] = Xml::check( 'wpWatchthis', $checked['watch'], $attribs ) . - " "; + " "; } wfRunHooks( 'EditPageBeforeEditChecks', array( &$this, &$checkboxes, &$tabindex ) ); return $checkboxes; diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 31c5f88934..005fb8e0fe 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -795,7 +795,7 @@ function wfMsgWikiHtml( $key ) { * parseinline: parses wikitext to html and removes the surrounding * p's added by parser or tidy * escape: filters message through htmlspecialchars - * escapenoentities: same, but allows entity references like   through + * escapenoentities: same, but allows entity references like   through * replaceafter: parameters are substituted after parsing or escaping * parsemag: transform the message using magic phrases * content: fetch message for content language instead of interface diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index 78c37945e3..b5472ac0ba 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -587,7 +587,7 @@ class HTMLForm { : $value->getDefault(); $tableHtml .= $value->getTableRow( $v ); - if ( $value->getLabel() != ' ' ) + if ( $value->getLabel() != ' ' ) $hasLeftColumn = true; } elseif ( is_array( $value ) ) { $section = $this->displaySection( $value, $key ); @@ -1133,7 +1133,7 @@ class HTMLCheckField extends HTMLFormField { $attr['disabled'] = 'disabled'; } - return Xml::check( $this->mName, $value, $attr ) . ' ' . + return Xml::check( $this->mName, $value, $attr ) . ' ' . Html::rawElement( 'label', array( 'for' => $this->mID ), $this->mLabel ); } @@ -1142,7 +1142,7 @@ class HTMLCheckField extends HTMLFormField { * added in getInputHTML(), rather than HTMLFormField::getRow() */ function getLabel() { - return ' '; + return ' '; } function loadDataFromRequest( $request ) { @@ -1333,7 +1333,7 @@ class HTMLMultiSelectField extends HTMLFormField { $checkbox = Xml::check( $this->mName . '[]', in_array( $info, $value, true ), $attribs + $thisAttribs ); - $checkbox .= ' ' . Html::rawElement( 'label', array( 'for' => $this->mID . "-$info" ), $label ); + $checkbox .= ' ' . Html::rawElement( 'label', array( 'for' => $this->mID . "-$info" ), $label ); $html .= $checkbox . '
    '; } @@ -1425,7 +1425,7 @@ class HTMLRadioField extends HTMLFormField { $info == $value, $attribs + array( 'id' => $id ) ); - $html .= ' ' . + $html .= ' ' . Html::rawElement( 'label', array( 'for' => $id ), $label ); $html .= "
    \n"; diff --git a/includes/HistoryPage.php b/includes/HistoryPage.php index d80356ad96..a62d9a16f0 100644 --- a/includes/HistoryPage.php +++ b/includes/HistoryPage.php @@ -148,8 +148,8 @@ class HistoryPage { ) . Xml::hidden( 'title', $this->title->getPrefixedDBKey() ) . "\n" . Xml::hidden( 'action', 'history' ) . "\n" . - Xml::dateMenu( $year, $month ) . ' ' . - ( $tagSelector ? ( implode( ' ', $tagSelector ) . ' ' ) : '' ) . + Xml::dateMenu( $year, $month ) . ' ' . + ( $tagSelector ? ( implode( ' ', $tagSelector ) . ' ' ) : '' ) . $checkDeleted . Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . "\n" . '' diff --git a/includes/LogEventsList.php b/includes/LogEventsList.php index 2c7939fc66..bfbbfa84d5 100644 --- a/includes/LogEventsList.php +++ b/includes/LogEventsList.php @@ -107,7 +107,7 @@ class LogEventsList { // Tag filter if ($tagSelector) { - $html .= Xml::tags( 'p', null, implode( ' ', $tagSelector ) ); + $html .= Xml::tags( 'p', null, implode( ' ', $tagSelector ) ); } // Filter links diff --git a/includes/MessageCache.php b/includes/MessageCache.php index 79d9e14caa..fa88fcf9ca 100644 --- a/includes/MessageCache.php +++ b/includes/MessageCache.php @@ -569,6 +569,7 @@ class MessageCache { ' ' => ' ', # Fix for NBSP, converted to space by firefox ' ' => "\xc2\xa0", + ' ' => "\xc2\xa0", ) ); return $message; diff --git a/includes/Pager.php b/includes/Pager.php index a84cbadc83..a381fd7f7b 100644 --- a/includes/Pager.php +++ b/includes/Pager.php @@ -817,7 +817,7 @@ abstract class TablePager extends IndexPager { # Make table header foreach ( $fields as $field => $name ) { if ( strval( $name ) == '' ) { - $s .= "
       and and     
       " . Xml::checkLabel( wfMsg( 'ipbanononly' ), 'wpAnonOnly', 'wpAnonOnly', $this->BlockAnonOnly, @@ -258,7 +258,7 @@ class IPBlockForm {
       " . Xml::checkLabel( wfMsg( 'ipbcreateaccount' ), 'wpCreateAccount', 'wpCreateAccount', $this->BlockCreateAccount, @@ -266,7 +266,7 @@ class IPBlockForm {
       " . Xml::checkLabel( wfMsg( 'ipbenableautoblock' ), 'wpEnableAutoblock', 'wpEnableAutoblock', $this->BlockEnableAutoblock, @@ -278,7 +278,7 @@ class IPBlockForm { if( self::canBlockEmail( $wgUser ) ) { $wgOut->addHTML("
       " . Xml::checkLabel( wfMsg( 'ipbemailban' ), 'wpEmailBan', 'wpEmailBan', $this->BlockEmail, @@ -292,7 +292,7 @@ class IPBlockForm { if( $wgUser->isAllowed( 'hideuser' ) ) { $wgOut->addHTML("
       " . Xml::checkLabel( wfMsg( 'ipbhidename' ), 'wpHideName', 'wpHideName', $this->BlockHideName, @@ -307,7 +307,7 @@ class IPBlockForm { if( $wgUser->isLoggedIn() ) { $wgOut->addHTML("
       " . Xml::checkLabel( wfMsg( 'ipbwatchuser' ), 'wpWatchUser', 'wpWatchUser', $this->BlockWatchUser, @@ -322,7 +322,7 @@ class IPBlockForm { if( $wgBlockAllowsUTEdit ){ $wgOut->addHTML("
       " . Xml::checkLabel( wfMsg( 'ipballowusertalk' ), 'wpAllowUsertalk', 'wpAllowUsertalk', $this->BlockAllowUsertalk, @@ -334,7 +334,7 @@ class IPBlockForm { $wgOut->addHTML("
       " . Xml::submitButton( wfMsg( $alreadyBlocked ? 'ipb-change-block' : 'ipbsubmit' ), array( 'name' => 'wpBlock', 'tabindex' => '13', 'accesskey' => 's' ) ) . " diff --git a/includes/specials/SpecialBooksources.php b/includes/specials/SpecialBooksources.php index 94cfc8a795..7733a0dc02 100644 --- a/includes/specials/SpecialBooksources.php +++ b/includes/specials/SpecialBooksources.php @@ -101,7 +101,7 @@ class SpecialBookSources extends SpecialPage { $form .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ); $form .= Xml::hidden( 'title', $title->getPrefixedText() ); $form .= '

    ' . Xml::inputLabel( wfMsg( 'booksources-isbn' ), 'isbn', 'isbn', 20, $this->isbn ); - $form .= ' ' . Xml::submitButton( wfMsg( 'booksources-go' ) ) . '

    '; + $form .= ' ' . Xml::submitButton( wfMsg( 'booksources-go' ) ) . '

    '; $form .= Xml::closeElement( 'form' ); $form .= ''; return $form; diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index 444fd32ff3..c667821b63 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -327,7 +327,7 @@ class SpecialContributions extends SpecialPage { '' . Xml::checkLabel( wfMsg( 'history-show-deleted' ), 'deletedOnly', 'mw-show-deleted-only', $this->opts['deletedOnly'] ) . - ( $tagFilter ? Xml::tags( 'p', null, implode( ' ', $tagFilter ) ) : '' ) . + ( $tagFilter ? Xml::tags( 'p', null, implode( ' ', $tagFilter ) ) : '' ) . Xml::openElement( 'p' ) . '' . Xml::dateMenu( $this->opts['year'], $this->opts['month'] ) . diff --git a/includes/specials/SpecialExport.php b/includes/specials/SpecialExport.php index 08819f2030..3559ddee95 100644 --- a/includes/specials/SpecialExport.php +++ b/includes/specials/SpecialExport.php @@ -148,11 +148,11 @@ class SpecialExport extends SpecialPage { $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalUrl( 'action=submit' ) ) ); - $form .= Xml::inputLabel( wfMsg( 'export-addcattext' ) , 'catname', 'catname', 40 ) . ' '; + $form .= Xml::inputLabel( wfMsg( 'export-addcattext' ) , 'catname', 'catname', 40 ) . ' '; $form .= Xml::submitButton( wfMsg( 'export-addcat' ), array( 'name' => 'addcat' ) ) . '
    '; if ( $wgExportFromNamespaces ) { - $form .= Xml::namespaceSelector( $nsindex, null, 'nsindex', wfMsg( 'export-addnstext' ) ) . ' '; + $form .= Xml::namespaceSelector( $nsindex, null, 'nsindex', wfMsg( 'export-addnstext' ) ) . ' '; $form .= Xml::submitButton( wfMsg( 'export-addns' ), array( 'name' => 'addns' ) ) . '
    '; } diff --git a/includes/specials/SpecialIpblocklist.php b/includes/specials/SpecialIpblocklist.php index ccb28992cf..a35ce19294 100644 --- a/includes/specials/SpecialIpblocklist.php +++ b/includes/specials/SpecialIpblocklist.php @@ -149,7 +149,7 @@ class IPUnblockForm { "
       " . Xml::submitButton( wfMsg( 'ipusubmit' ), array( 'name' => 'wpBlock', 'tabindex' => '3' ) ) . "{$lc}
      
       " . Xml::submitButton( wfMsg( 'mergehistory-submit' ), array( 'name' => 'merge', 'id' => 'mw-merge-submit' ) ) . "
       " . Xml::submitButton( $movepagebtn, array( 'name' => $submitVar ) ) . "
       " . Xml::checkLabel( wfMsg('revdelete-unsuppress'), 'wpUnsuppress', 'mw-undelete-unsuppress', $this->mUnsuppress ). @@ -1096,7 +1096,7 @@ class UndeleteForm { "
       " . Xml::submitButton( wfMsg( 'undeletebtn' ), array( 'name' => 'restore', 'id' => 'mw-undelete-submit' ) ) . ' ' . Xml::element( 'input', array( 'type' => 'reset', 'value' => wfMsg( 'undeletereset' ), 'id' => 'mw-undelete-reset' ) ) . ' ' . diff --git a/includes/specials/SpecialUnlockdb.php b/includes/specials/SpecialUnlockdb.php index fe38a48a6b..0c52ff6ed7 100644 --- a/includes/specials/SpecialUnlockdb.php +++ b/includes/specials/SpecialUnlockdb.php @@ -66,7 +66,7 @@ class DBUnlockForm { {$lc}