Manual:$wgExternalInterwikiFragmentMode

Output: $wgExternalInterwikiFragmentMode
Determines which ID escaping mode should be used for external interwiki links
Introduced in version:1.30.0 (Gerrit change 362326; git #Id304010)
Removed in version:still in use
Allowed values:'legacy', 'html5', or 'html5-legacy'
Default value:'legacy'

Details edit

See documentation for $wgFragmentMode above for details of each mode. Because you cannot control external sites, this setting should probably always be 'legacy', unless every wiki you link to has converted to 'html5'.

'legacy' is the recommended setting to this configuration parameter.