Page MenuHomePhabricator

Closing semicolon in SVG style
Closed, ResolvedPublic


SVG generated in mathml mode comes with a style attribute of the following form:
style="vertical-align:-.505ex" (there is no closing semicolon).
When this attribute is processed in function correctSvgStyle it sticks to the next attribute (height).
That leads to the following HTML code:
<meta class="mwe-math-fallback-image-inline" aria-hidden="true" style="background-image: url('URL;mode=mathml'); background-repeat: no-repeat; background-size: 100% 100%; vertical-align:-.505exheight: 2.843ex; width: 28.527ex;">

Such a picture has zero height and thus is invisible (in chrome).

I fixed this issue with a following code in MathML.php:
$style .= ' ' . $styles[1] . '; ';
instead of
$style .= ' ' . $styles[1];

Event Timeline

Thank you for your nice bug report. From wich server do you get your svg images. In the most recent version the style informatino should already be in the svg response header and correctSVGStyle should not be called at all.

To be honest I don't know. I use 'default' server ( ?). I didn't set up any servers in LocalSettings.php.

Everything was OK until yesterday. Perhaps they have changed something recently.

Change 283166 had a related patch set uploaded (by Physikerwelt):
Ensure use of ; to seperate svg styles

OK. That makes perfect sense. I updated that server yesterday. Thank you again for your bug report. I submitted a patch for code review.

Change 283166 merged by jenkins-bot:
Ensure use of ; to seperate svg styles

Physikerwelt claimed this task.