Page MenuHomePhabricator

MathML/SVG/PNG mode causing problems with Nook Tablet.
Closed, ResolvedPublic


I found the following bug report at

MathML is the default for the format delivered to the browser. My browser does not support MathML. A month ago, I saw formulas. > Today, I see absolutely nothing.

I saw the notices that at least two discussions were "closed", and should not be edited, and that further comments should be directed to the "appropriate discussion page". If this is not that page, please advise.

Those discussions seemed to end with the decision not to change the default rendering technique, yet I am suddenly unable to view any formula without logging in.

(I am using the stock browser on a Nook Tablet. I have not tried on a real computer.)

Jmichael ll

I don't have a Nook Tablet, so I can't test it myself. I requested a screenshot (with info on how to post it), but if there is anything else you need, please tell me and I will ask for it.

Here is some more information. I find it quite odd that nothing is displayed at all not even a fallback image.

It works fine in Firefox 27 and in Internet Explorer 10. (A variety of posts had suggested that MathML was not supported in most browsers.)
I don't think there's any way to post a screen shot of a Nook Tablet, short of finding a digital camera. If you can take my word for it, on a real computer the first formula in the article "Russell's paradox" looks like:

     <perfectly good looking formula>

while on the Nook Tablet, what I see is:


That's it, nothing displays between "Symbolically:" and the next paragraph of text.
When I peek at the page source (not "Edit" in Wikipedia, but the innerHTML on the browser itself), I see things like XML references (maybe referring to the MathML standard, maybe trying to include Javascript), and a bunch of HTML-like tags that are NOT in the Wikipedia source (as displayed by "Edit").
I appreciate your showing an interest in this. Let me know if you think it would help for me to go to this "Phabricator".
Jmichael ll

Event Timeline

Hungryce triaged this task as High priority.Jun 3 2016, 1:11 AM

I believe the Nook might be using "Dolphin Browser HD", which should be based on an older webkit version. See

One thing to check: Could you try visiting again? I purged that page to make sure that the very latest changes are applied.

The "formula" in Russell's paradox looks different now: there is a rectangular frame, about one text line high, about two thirds the width of the screen. In the center of the frame is a square icon showing a question mark. The icon looks familiar, so it might be what the browser displays when it is unable to load an image.

I am using the stock browser on the Nook Tablet. I also have a copy of the Dolphin browser. It behaves the same as the stock browser: earlier today, it displayed absolutely nothing where the formula was supposed to be. Now, it displays the square question mark icon in the center of a rectangular outline.

I had thought that the problem was that Wikipedia had changed the way it reacted to the User-Agent string sent by the stock browser. (Within the last two weeks, Google screwed me out of the Image Search Results display format I've enjoyed for years -- I believe because it suddenly changed which User-Agents it would permit to use that format.) Now it looks like the fallback image is delivered along with the horrible MathML markup.

The image delivered when I cannot see it comes from
The image delivered when I log in and set formula Preference to PNG comes from

Maybe the Nook browser can't handle SVG.

@fredw do you have an idea what the problem might be? or do you have any contacts that could now something about that? Maybe in the context of your Mathematics in ebooks project.

@Jmichael can you replace /svg/ with /png/ and see what happens. If you are able to display png but not svg we should be able to fix that based on your user agent.

Change 292529 had a related patch set uploaded (by Physikerwelt):
Fix: Update png fallback

Change 292529 merged by jenkins-bot:
Fix: Update png fallback

@Physikerwelt I don't know whether you mean edit the source sent to the browser or just try visiting the image file with a modified name. Either way, I don't have a real browser, I don't have a real Android tablet, I'm not in a position to copy/paste/edit the source sent to the browser.

There's no doubt that the browser can handle at least some PNG files -- when I log in to Wikipedia and set my math formula preference to PNG, I see perfectly good formulas.

I hate the idea of you feeding me based on my User-Agent string -- the Nook browser User-Agent is ridiculous. It claims Safari, AppleWebKit. If you key off of the Barnes & Noble specific crap, you leave the problem for any other crippled browser.

Isn't there a point at which the browser sends a list of the image types it supports?

@Physikerwelt The Dolphin browser has a "save page" option. I don't trust it: I have seen a case where the text it saved was not what I saw when I viewed the source (innerHTML) of a page.

When I used the Dolphin "save page" to collect the full fallback image element when I see the question mark icon, and again when I force PNG (and can see the formula):

the "svg" displays as a question mark icon
changing "svg" to "png" in the URL displays the formula
the URL for the PNG displays as a question mark icon

Why are the svg and png files delivered from different domains?

I'm changing my story:

  • When I'm given an SVG fallback image, the URL begins "", and I get a question mark icon.
  • If I change "svg" to "png" in that URL, I get a formula displayed.
  • When I'm given a PNG fallback image, the URL begins "//". I did not forget to type "https:", it is not in the "src" attribute of the "img" element. If I insert "https:", or put a '<base href="">' in my test file, I get a formula displayed. It is distinctly different from the one displayed when I changed "svg" to "png" in item 2 above.

@Jmichael: Thank you for the follow-up investigation!

The wikipedia page lists the Nook as running Android 2.3, which didn't have SVG support in its stock browser. The odd thing is that this should normally trigger the PNG fall-back, at least if JS is enabled. The test we use for this is based on

// Note is *supposed* to represent
// support for the `<image>` tag in SVG, not an SVG file linked from an `<img>`
// tag in HTML – but it’s a heuristic which works
Modernizr.addTest('svgasimg', document.implementation.hasFeature('', '1.1'));

@Jmichael, do you have JS enabled in both browsers? If yes, then this might be related to the caveat in the comment above.

I do have Javascript enabled in both browsers.
hasFeature returns false in both browsers.
I'm unclear when the code from either of the github references is run.

Wouldn't it be safer if the default were to deliver HTML that uses PNG, and have Javascript change png to svg if it detects support? When Javascript is disabled, svg would never be used, but at least the user would see something.

@GWicke Wouldn't the caveat only apply if hasFeature were returning true?

There was a bug in the generation of the PNG fall-back img tag that has been fixed and it should be applied to Wikipedias by this Thursday evening. In the meantime, could you try to open and let us know if you can see the formula?

Awesome! Let's wait Thursday evening / Friday morning to confirm you can see them on wp as well before closing the task.

I see formulas on Wikipedia, using the Nook, without logging in.

When I log in, the formula looks different: a little smaller, not bold. The image is coming from

Thanks for taking care of this.

mobrovac assigned this task to Physikerwelt.

I see formulas on Wikipedia, using the Nook, without logging in.


When I log in, the formula looks different: a little smaller, not bold. The image is coming from

You need to switch your preferences to use MathML rather than PNG and it'll sort itself out.

Thanks for taking care of this.

Thank you for reporting and investigating!

Have the fallback image rules been changed?

Since about 10 August, if I try to view a Wikipedia page in the Nook Tablet browser, without being logged into Wikipedia, the browser hangs. There's no way to "exit" the browser, so I'm forced to reboot the tablet.

Before hanging, the browser does display (most of) the page. Where there should be a formula, I see the little question mark box. When I view the page on a real computer, without logging into Wikipedia, I see that the fallback image is SVG. Since, when my problem was resolved in June, I was able to see formulas without logging into Wikipedia, I'm sure that at that time the default fallback image was PNG. I don't know that this is connected to the browser hanging, but it seems likely to be related: If the page I go to after rebooting the tablet is the login page, I am able (at least sometimes) to enter my username and password so that (at least after the next reboot) I am already logged in, and I am then able to view Wikipedia pages. (My Personal Preferences still call for PNG images.)