Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -288,6 +288,7 @@ |
289 | 289 | * this breaks interlanguage links |
290 | 290 | */ |
291 | 291 | $wgLegalTitleChars = " %!\"$&'()*,\\-.\\/0-9:;=?@A-Z\\\\^_`a-z~\\x80-\\xFF+"; |
| 292 | +$wgIllegalFileChars = ":"; // These are additional characters that should be replaced with '-' in file names |
292 | 293 | |
293 | 294 | /** |
294 | 295 | * The external URL protocols |
Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -3228,8 +3228,9 @@ |
3229 | 3229 | * @param $name Mixed: filename to process |
3230 | 3230 | */ |
3231 | 3231 | function wfStripIllegalFilenameChars( $name ) { |
| 3232 | + global $wgIllegalFileChars; |
3232 | 3233 | $name = wfBaseName( $name ); |
3233 | | - $name = preg_replace ( "/[^".Title::legalChars()."]|:/", '-', $name ); |
| 3234 | + $name = preg_replace("/[^".Title::legalChars()."]".($wgIllegalFileChars ? "|[".$wgIllegalFileChars."]":"")."/",'-',$name); |
3234 | 3235 | return $name; |
3235 | 3236 | } |
3236 | 3237 | |