r92178 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92177‎ | r92178 | r92179 >
Date:18:44, 14 July 2011
Author:catrope
Status:ok
Tags:
Comment:
1.17wmf1: MFT r92005, another prot rel URL fix
Modified paths:
  • /branches/wmf/1.17wmf1/includes/parser/Parser.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/includes/parser/Parser.php
@@ -1401,16 +1401,10 @@
14021402
14031403 # No link text, e.g. [http://domain.tld/some.link]
14041404 if ( $text == '' ) {
1405 - # Autonumber if allowed. See bug #5918
1406 - if ( strpos( wfUrlProtocols(), substr( $protocol, 0, strpos( $protocol, ':' ) ) ) !== false ) {
1407 - $langObj = $this->getFunctionLang();
1408 - $text = '[' . $langObj->formatNum( ++$this->mAutonumber ) . ']';
1409 - $linktype = 'autonumber';
1410 - } else {
1411 - # Otherwise just use the URL
1412 - $text = htmlspecialchars( $url );
1413 - $linktype = 'free';
1414 - }
 1405+ # Autonumber
 1406+ $langObj = $this->getFunctionLang();
 1407+ $text = '[' . $langObj->formatNum( ++$this->mAutonumber ) . ']';
 1408+ $linktype = 'autonumber';
14151409 } else {
14161410 # Have link text, e.g. [http://domain.tld/some.link text]s
14171411 # Check for trail
Property changes on: branches/wmf/1.17wmf1/includes/parser/Parser.php
___________________________________________________________________
Modified: svn:mergeinfo
14181412 Merged /trunk/phase3/includes/parser/Parser.php:r92005

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r92005Fix r14202 (!!): this validates the protocol against the regex for the second...catrope20:55, 12 July 2011

Status & tagging log