Page MenuHomePhabricator

CSP blocks inline styles in math rendered as SVG
Closed, ResolvedPublic

Description

When I view any math rendered as SVG directly, e.g. https://wikimedia.org/api/rest_v1/media/math/render/svg/c15343dec20e53eac7195118d549040cf7dc6cb6 I get a warning in the browser console that the inline style was blocked. Indeed, the code has a style="vertical-align: -0.838ex;" in the <svg> tag, and the CSP header is content-security-policy: default-src 'none'; media-src *; img-src *; style-src *;frame-ancestors 'self'.
I do not see these warnings in the normal browser console when viewing an article containing a math formula, but I do see them in the extra console in Firefox (Ctrl+Shift+J).
I do not notice any misalignment due to the blocked style, but something should be done about the warning regardless.

Event Timeline

Physikerwelt claimed this task.
Physikerwelt subscribed.

Might have been resolved. I can not see the error in my browser.