WordPress-Android
WordPress-Android copied to clipboard
Comments: LaTeX images are not rendered and an error displays
Ref. pbArwn-1v1-p2#comment-2201

Sister issue: https://github.com/wordpress-mobile/WordPress-iOS/issues/15483
Sample snippet of HTML from the Comment content field, on its own line:
\n<p>Bayes Rule says that:</p>\n<p><!-- /wp:paragraph --></p>\n<p><!-- wp:paragraph --></p>\n<p><img src=\"https://s0.wp.com/latex.php?latex=P%28Y%7CX%29+%3D+%5Cfrac%7BP%28X%7CY%29P%28Y%29%7D%7BP%28X%29%7D&bg=ffffff&fg=000&s=0&c=20201002\" alt=\"P(Y|X) = \frac{P(X|Y)P(Y)}{P(X)}\" title=\"P(Y|X) = \frac{P(X|Y)P(Y)}{P(X)}\" class=\"latex\" /></p>\n<p><!-- /wp:paragraph --></p>\n
Sample snippet of HTML from the Comment content field, inline LaTeX:
but here’s my understanding of the problem: you want to measure how a certain event (<img src=\"https://s0.wp.com/latex.php?latex=X&;bg=ffffff&;fg=000&;s=0&;c=20201002\" alt=\"X\" title=\"X\" class=\"latex\" />, e.g. replying to a comment) will influence an outcome (<img src=\"https://s0.wp.com/latex.php?latex=Y&bg=ffffff&fg=000&s=0&c=20201002\" alt=\"Y\" title=\"Y\" class=\"latex\" />, e.g. being active in November), which is the probability of Y happening given that you know X (<img src=\"https://s0.wp.com/latex.php?latex=P%28Y%7CX%29&bg=ffffff&fg=000&s=0&c=20201002\" alt=\"P(Y|X)\" title=\"P(Y|X)\" class=\"latex\" />).
Expected behavior
When a user leaves a comment that uses LaTeX, the generated image(s) should display.
Actual behavior
When an image is generated from LaTeX, an error view appears in yellow and red stating "No formula provided".
Steps to reproduce
- Leave a comment with inline LaTex.
- Leave a comment that uses LaTeX on its own line.
- Navigate to Reader > Followed site > post > comments. There are no images rendered.
Tested on Pixel 2, Android 10, WPAndroid 16.3
Still the case in WP Android 20.4-rc-2.