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

Avsmal created this task.Apr 13 2016, 12:09 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 13 2016, 12:09 PM
Avsmal updated the task description. (Show Details)Apr 13 2016, 12:10 PM

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.

Avsmal added a comment.EditedApr 13 2016, 12:36 PM

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 closed this task as Resolved.Apr 28 2016, 2:31 AM
Physikerwelt claimed this task.