The GMail site doesn't work in Fennec Native when there is RTL text in the inbox



Tech Evangelism
6 years ago
5 years ago


(Reporter: Amir Aharoni, Unassigned)


Firefox Tracking Flags

(Not tracked)



(1 attachment)



6 years ago
1. Open in Fennec Native.
2. Enter user name and password.
3. An XML error appears.

In the built-in Webkit browser a mobile GMail website appears.

Tested on Sony Xperia Neo and on Samsung Galaxy SII - same results.
This works for me this morning. Anyhow this is Google's issue, the last time they did this it was an issue with an unescaped ampersand ...
Assignee: nobody → english-us
Component: General → English US
OS: Linux → Android
Product: Fennec Native → Tech Evangelism
QA Contact: general → english-us
Hardware: x86_64 → ARM


6 years ago
Assignee: english-us → nobody
Component: English US → Evangelism
Product: Tech Evangelism → Fennec Native
QA Contact: english-us → evangelism

Comment 2

6 years ago
Some more details:

In my inbox I have an email from somebody whose name is יצחק לוי, in Hebrew letters. The Android stock browser shows the inbox without problems, but Firefox stops and gives an error:

XML Parsing Error: not well-formed
Line Number 49, Column 11:

<span dir=rtl><b>יצחק לוי</b></span>

Column 11 is after the equals sign (=). My guess is that Firefox doesn't like it that the argument value is without quotes.

Aharon, is it possible to fix it on GMail's side? Or is there a reason to send it without quotes?

If I try to access another account in which I don't have emails with right-to-left sender names, GMail works.


6 years ago
Summary: The GMail site doesn't work in Fennec Native → The GMail site doesn't work in Fennec Native when there is RTL text in the inbox

Comment 3

6 years ago
Created attachment 644682 [details]

I am able to reproduce. I've also checked and we don't have any hidden control characters inserted in the code in unexpected place.

Comment 4

6 years ago
Unable to reproduce after changing user agent on my desktop browser, but look what I've found is the source of the provided mobile page – This is indeed an xhtml page, and the RTL patches probably intended to HTML pages and not XHTML.

Still, I'm not even sure if the page itself validates, as I don't see the closing tag for the meta elements. 

<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, width=device-width">
<meta name="format-detection" content="email=no">
copying comment from dupe that I opened:

I also tried entering the URI of the page with the error manually into desktop Firefox (which was logged into the same GMail account). I can't tell if GMail served exactly the same content and headers as it did for mobile, but the inbox displayed without errors.

On the desktop there is an HTTP header

Content-Type:text/html; charset=UTF-8

but the page itself says

<html xmlns="">
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8"/>

(I don't know how to view the HTTP headers in Fennec)

The page is still malformed XML, with dir=rtl without quotes, so the question is, why is desktop Firefox not using the XML parser to parse i, but Fennec is.
Duplicate of this bug: 776347
Blocks: 776629
I tried spoofing user agents in both direction, and it turns out that with the user agent string:

Mozilla/5.0 (Android; Mobile; rv:17.0) Gecko/17.0 Firefox/17.0

on either desktop or mobile, the HTTP headers say:

Content-Type: application/html+xml; charset=UTF-8

and I get the XML parsing error; but with the user agent string:

Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Firefox/17.0

also on either desktop or mobile, the HTTP headers say:

Content-Type: text/html; charset=UTF-8

and the inbox displays without errors.


5 years ago
Component: Evangelism → Mobile
Product: Firefox for Android → Tech Evangelism
Does this still reproduce?

Comment 9

5 years ago
It seems to work now.

There's another issue - Firefox seems to get the old GMail mobile site, not the new one that the stock browser gets. But it's a question for a different bug.
Last Resolved: 5 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.