}
}
+ $illegalFileChars = $conf->get( 'IllegalFileChars' );
+
// Build list of variables
$vars = [
'wgLoadScript' => wfScript( 'load' ),
'wgResourceLoaderMaxQueryLength' => $conf->get( 'ResourceLoaderMaxQueryLength' ),
'wgCaseSensitiveNamespaces' => $caseSensitiveNamespaces,
'wgLegalTitleChars' => Title::convertByteClassToUnicodeClass( Title::legalChars() ),
+ 'wgIllegalFileChars' => Title::convertByteClassToUnicodeClass( $illegalFileChars ),
'wgResourceLoaderStorageVersion' => $conf->get( 'ResourceLoaderStorageVersion' ),
'wgResourceLoaderStorageEnabled' => $conf->get( 'ResourceLoaderStorageEnabled' ),
'wgResourceLoaderLegacyModules' => self::getLegacyModules(),
},
// 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
},