},
// slash, colon (not supported by file systems like NTFS/Windows, Mac OS 9 [:], ext4 [/])
{
- pattern: /[:\/#]/g,
+ pattern: new RegExp( '[' + mw.config.get( 'wgIllegalFileChars', '' ) + ']', 'g' ),
replace: '-',
fileRule: true
},
// Thumbnails
/\/[a-f0-9]\/[a-f0-9]{2}\/([^\s\/]+)\/[^\s\/]+-[^\s\/]*$/,
- // Thumbnails in non-hashed upload directories
- /\/([^\s\/]+)\/[^\s\/]+-(?:\1|thumbnail)[^\s\/]*$/,
-
// Full size images
/\/[a-f0-9]\/[a-f0-9]{2}\/([^\s\/]+)$/,
+ // Thumbnails in non-hashed upload directories
+ /\/([^\s\/]+)\/[^\s\/]+-(?:\1|thumbnail)[^\s\/]*$/,
+
// Full-size images in non-hashed upload directories
/\/([^\s\/]+)$/
],