Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -198,6 +198,7 @@ |
199 | 199 | cssText after DOM insertion. |
200 | 200 | * (bug 30711) When adding a new section to a page with section=new, the text is |
201 | 201 | now always added to the current version of the page |
| 202 | +* (bug 31719) Recognize &ns_svg; as the svg namespace when extracting width |
202 | 203 | |
203 | 204 | === API changes in 1.19 === |
204 | 205 | * (bug 19838) siprop=interwikimap can now use the interwiki cache. |
Index: trunk/phase3/includes/media/SVGMetadataExtractor.php |
— | — | @@ -36,6 +36,7 @@ |
37 | 37 | const DEFAULT_WIDTH = 512; |
38 | 38 | const DEFAULT_HEIGHT = 512; |
39 | 39 | const NS_SVG = 'http://www.w3.org/2000/svg'; |
| 40 | + const ADOBE_SVG_ENTITY = '&ns_svg;'; |
40 | 41 | |
41 | 42 | private $reader = null; |
42 | 43 | private $mDebug = false; |
— | — | @@ -102,7 +103,10 @@ |
103 | 104 | $keepReading = $this->reader->read(); |
104 | 105 | } |
105 | 106 | |
106 | | - if ( $this->reader->localName != 'svg' || $this->reader->namespaceURI != self::NS_SVG ) { |
| 107 | + # Note, entities not expanded in namespaceURI - bug 31719 |
| 108 | + if ( $this->reader->localName != 'svg' || |
| 109 | + ( $this->reader->namespaceURI != self::NS_SVG && |
| 110 | + $this->reader->namespaceURI != self::ADOBE_SVG_ENTITY ) ) { |
107 | 111 | throw new MWException( "Expected <svg> tag, got ". |
108 | 112 | $this->reader->localName . " in NS " . $this->reader->namespaceURI ); |
109 | 113 | } |