Page MenuHomePhabricator

Media Viewer's image-details does not handle <math> markup in truncated-text
Open, LowPublic

Description

For example, when viewing this page on a mobile device:
https://en.m.wikipedia.org/wiki/User:Beland/math_bug
At first, <math>\sqrt{2}</math> in the image caption is rendered correctly as something like √2. Tapping on the image loads it for full-screen viewing, I think using the Media Viewer extension? The formula doesn't render properly, and is displayed as "2 {\displaystyle {\sqrt {2}}}".

Event Timeline

Aklapper renamed this task from Media Viewer does not handle <math> markup to Media Viewer's image-details does not handle <math> markup in truncated-text.Sep 22 2020, 6:01 PM

The page https://en.m.wikipedia.org/wiki/User:Beland/math_bug renders correctly when viewed in a desktop browser. It seems to render fine on an android phone, in chrome and Samsung internet browser.

Image description pages like https://commons.wikimedia.org/wiki/File:Peano_intersection.png#/media/File:Peano_intersection.png do not render correctly in Firefox/Chrome running on windows 10, the equation is not displayed.

Yes, you need to click on the image to see the bug, which takes you to e.g.: https://en.m.wikipedia.org/wiki/User:Beland/math_bug#/media/File%3AWikipedia-logo-v2.svg (notice the broken square root in the description at the bottom of the page).

That is because the MMV description is not a wiki page. You can also not put an image inside a caption for instance, or a graph, or a map.

Right; images and graphs and stuff generally aren't needed in captions. But sometimes it is necessary to put complicated math expressions in captions to explain what is being visualized.

Aklapper triaged this task as Low priority.Jul 14 2022, 9:51 AM