Allow SVGs using an older proposed recommendation DTD
authorMatthias Mullie <git@mullie.eu>
Tue, 27 Jun 2017 13:47:36 +0000 (15:47 +0200)
committerMatthias Mullie <git@mullie.eu>
Tue, 27 Jun 2017 13:47:55 +0000 (15:47 +0200)
Dia software seems to use this DTD (at least in some versions)

Bug: T168856
Change-Id: I51ad7ff4a935d4edb78e091142be9c58017dd3af

includes/upload/UploadBase.php

index 0868ce6..57bb22a 100644 (file)
@@ -1411,7 +1411,9 @@ abstract class UploadBase {
                        'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd',
                        'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd',
                        'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd',
-                       'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd'
+                       'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd',
+                       // https://phabricator.wikimedia.org/T168856
+                       'http://www.w3.org/TR/2001/PR-SVG-20010719/DTD/svg10.dtd',
                ];
                if ( $type !== 'PUBLIC'
                        || !in_array( $systemId, $allowedDTDs )