From f2e9dbe70cf89c6ef8e509670b71a350ca0d7a5e Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Wed, 8 Oct 2014 17:09:12 -0700 Subject: [PATCH] Bug 71857: Strip positioning from SVG fallback image styles Change-Id: Ie664b421ee40c3d278605bd03cb669509319d862 --- MathMathML.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MathMathML.php b/MathMathML.php index d4f19fe..fb2fc84 100644 --- a/MathMathML.php +++ b/MathMathML.php @@ -349,7 +349,7 @@ class MathMathML extends MathRenderer { $style .= " ".$styles[1]; // merge styles if ( $this->getMathStyle() === MW_MATHSTYLE_DISPLAY ) { // TODO: Improve style cleaning - $style = preg_replace( '/margin\-(left|right)\:\s*\d+(\%|in|cm|mm|em|ex|pt|pc|px)\;/', '', $style ); + $style = preg_replace( '/margin\-(left|right)\:\s*\d+(\%|in|cm|mm|em|ex|pt|pc|px)\;|position:\s*absolute;\s*left:\s*0px;/', '', $style ); } } // TODO: Figure out if there is a way to construct