r67798 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67797‎ | r67798 | r67799 >
Date:11:16, 10 June 2010
Author:platonides
Status:resolved (Comments)
Tags:
Comment:
"<p id="userloginlink"><p>Don't have an account" is illegal xhtml
Modified paths:
  • /trunk/phase3/includes/specials/SpecialUserlogin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialUserlogin.php
@@ -982,7 +982,7 @@
983983
984984 # Don't show a "create account" link if the user can't
985985 if( $this->showCreateOrLoginLink( $wgUser ) )
986 - $template->set( 'link', wfMsgWikiHtml( $linkmsg, $link ) );
 986+ $template->set( 'link', preg_replace('/(^<p>|<\/p>$)/', '', wfMsgWikiHtml( $linkmsg, $link ) ) );
987987 else
988988 $template->set( 'link', '' );
989989

Follow-up revisions

RevisionCommit summaryAuthorDate
r67801Follow up r67798. Use wfMsgExt() with 'parseinline' and 'replaceafter' as poi...platonides11:53, 10 June 2010

Comments

#Comment by Liangent (talk | contribs)   11:21, 10 June 2010

Does a wfMsgExt() with 'parseinline' and 'replaceafter' work? I guess that's prettier because there's no regex everywhere.

Status & tagging log