summaryrefslogtreecommitdiff
path: root/includes/media/SVGMetadataExtractor.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
committerPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
commitd9022f63880ce039446fba8364f68e656b7bf4cb (patch)
tree16b40fbf17bf7c9ee6f4ead25b16dd192378050a /includes/media/SVGMetadataExtractor.php
parent27cf83d177256813e2e802241085fce5dd0f3fb9 (diff)
Update to MediaWiki 1.19.0
Diffstat (limited to 'includes/media/SVGMetadataExtractor.php')
-rw-r--r--includes/media/SVGMetadataExtractor.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/includes/media/SVGMetadataExtractor.php b/includes/media/SVGMetadataExtractor.php
index 22ef8e61..db9f05fd 100644
--- a/includes/media/SVGMetadataExtractor.php
+++ b/includes/media/SVGMetadataExtractor.php
@@ -68,6 +68,12 @@ class SVGReader {
$this->reader->open( $source, null, LIBXML_NOERROR | LIBXML_NOWARNING );
}
+ // Expand entities, since Adobe Illustrator uses them for xmlns
+ // attributes (bug 31719). Note that libxml2 has some protection
+ // against large recursive entity expansions so this is not as
+ // insecure as it might appear to be.
+ $this->reader->setParserProperty( XMLReader::SUBST_ENTITIES, true );
+
$this->metadata['width'] = self::DEFAULT_WIDTH;
$this->metadata['height'] = self::DEFAULT_HEIGHT;
@@ -166,7 +172,7 @@ class SVGReader {
}
}
- /*
+ /**
* Read an XML snippet from an element
*
* @param String $metafield that we will fill with the result