Index: includes/Linker.php =================================================================== --- includes/Linker.php (revision 84801) +++ includes/Linker.php (working copy) @@ -1518,8 +1518,12 @@ if ( $trail !== '' ) { $m = array(); if ( preg_match( $regex, $trail, $m ) ) { - $inside = $m[1]; - $trail = $m[2]; + // bug 27473: If there are two or more apostrophes in a row in the + // linktrail, put them outside the link. This could be handled in the + // localized regexes, but is safer to do here. + $pos = strpos( $m[1], "''" ); + $inside = $pos === false ? $m[1] : substr( $m[1], 0, $pos ); + $trail = $pos === false ? $m[2] : substr( $m[1], $pos ) . $m[2]; } } return array( $inside, $trail );