Open main menu

Manual:$wgAllowTitlesInSVG

This page is a translated version of the page Manual:$wgAllowTitlesInSVG and the translation is 30% complete.

Other languages:
English • ‎español • ‎magyar • ‎polski • ‎português • ‎日本語
SVG: $wgAllowTitlesInSVG
Allow <title> tag in SVG files.
Introducido en la versión:1.7.0 (r14084)
Eliminado en la versión:aún se usa
Valores permitidos:(booleano)
Valor predeterminado:false
Otros configuración: Alfabéticamente | Por Función

Detalles

If true, the text <title> will be allowed in files with a "svg" file extension or "image/svg+xml" MIME type.

MediaWiki will reject HTML-esque tags (including <title>) in uploaded files, as some browsers can't perform basic stuff like MIME detection and are therefore vulnerable to displaying valid image files as HTML and doing insecure things. You should leave this set to false if your web server is misconfigured and doesn't send appropriate MIME types for SVG images.

What are appropriate MIME types for SVG images? Well, that is currently under debate at the W3C[1], but you should see Content-Type: image/svg+xml in response headers when making a GET request for an svg file. You can easily check your server using the W3C's online SVG check tool. Or, from the command-line with curl:

curl -I https://freephile.qualitybox.us/w/img_auth.php/0/09/MediaWiki_Architecture.svg
HTTP/1.1 200 OK
Date: Sun, 11 Feb 2018 05:01:23 GMT
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.6.33
X-Powered-By: PHP/5.6.33
X-Content-Type-Options: nosniff
Last-Modified: Sat, 01 Jul 2017 15:50:20 GMT
Content-Length: 69832
Content-Type: image/svg+xml