Bug 71857: Strip position style in all math modes

Change-Id: Ib965e687ae4e7afe86f92b497ffcbc349950fecf
This commit is contained in:
Gabriel Wicke 2014-10-09 11:28:49 -07:00 committed by GWicke
parent b7bd5196f2
commit b762bef909
1 changed files with 2 additions and 1 deletions

View File

@ -349,8 +349,9 @@ 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)\;|position:\s*absolute;\s*left:\s*0px;/g', '', $style );
$style = preg_replace( '/margin\-(left|right)\:\s*\d+(\%|in|cm|mm|em|ex|pt|pc|px)\;/', '', $style );
}
$style = preg_replace( '/position:\s*absolute;\s*left:\s*0px;/', '', $style );
}
// TODO: Figure out if there is a way to construct
// a SVGReader from a string that represents the SVG