Index: trunk/phase3/includes/ImageFunctions.php |
— | — | @@ -53,10 +53,10 @@ |
54 | 54 | return false; |
55 | 55 | } |
56 | 56 | $tag = $matches[1]; |
57 | | - if( preg_match( '/\bwidth\s*=\s*("[^"]+"|\'[^\']+\')/s', $tag, $matches ) ) { |
| 57 | + if( preg_match( '/(?:^|\s)width\s*=\s*("[^"]+"|\'[^\']+\')/s', $tag, $matches ) ) { |
58 | 58 | $width = wfScaleSVGUnit( trim( substr( $matches[1], 1, -1 ) ) ); |
59 | 59 | } |
60 | | - if( preg_match( '/\bheight\s*=\s*("[^"]+"|\'[^\']+\')/s', $tag, $matches ) ) { |
| 60 | + if( preg_match( '/(?:^|\s)height\s*=\s*("[^"]+"|\'[^\']+\')/s', $tag, $matches ) ) { |
61 | 61 | $height = wfScaleSVGUnit( trim( substr( $matches[1], 1, -1 ) ) ); |
62 | 62 | } |
63 | 63 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -124,6 +124,7 @@ |
125 | 125 | * (bug 6447) Trackbacks now work with transactional tables, if enabled |
126 | 126 | * (bug 6892, 7147) Trackback error handling, optional fields more robust |
127 | 127 | * (bug 6813) Don't break HTML validator when using trackbacks |
| 128 | +* Fix for size checks on SVG images with global 'stroke-width' attribute |
128 | 129 | |
129 | 130 | |
130 | 131 | === API changes in 1.13 === |