r13301 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r13300‎ | r13301 | r13302 >
Date:16:40, 24 March 2006
Author:gabrielwicke
Status:old
Tags:
Comment:
Fix bug 2095: three closing brackets
Modified paths:
  • /trunk/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Parser.php
@@ -1407,7 +1407,11 @@
14081408 # Still some problems for cases where the ] is meant to be outside punctuation,
14091409 # and no image is in sight. See bug 2095.
14101410 #
1411 - if( $text !== '' && preg_match( "/^\](.*)/s", $m[3], $n ) ) {
 1411+ if( $text !== '' &&
 1412+ preg_match( "/^\](.*)/s", $m[3], $n ) &&
 1413+ strpos($text, '[') !== false
 1414+ )
 1415+ {
14121416 $text .= ']'; # so that replaceExternalLinks($text) works later
14131417 $m[3] = $n[1];
14141418 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r13307Collected updates:...gabrielwicke17:10, 24 March 2006

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r9091Add parser test for bug 2095; working on it...vibber08:43, 18 May 2005
r9095Fix for the main (no pipe) case of bug 2095, triple closing backets on link...vibber09:21, 18 May 2005

Status & tagging log