Closed
Bug 1014672
Opened 11 years ago
Closed 11 years ago
& character translated to &
Categories
(Firefox :: Translations, defect)
Tracking
()
VERIFIED
FIXED
Firefox 32
People
(Reporter: Kensie, Assigned: Felipe)
References
()
Details
(Whiteboard: p=1 s=it-32c-31a-30b.3 [qa-])
Attachments
(3 files)
http://www.mercotte.fr/recettes/macarons/
Translating from fr to en, & character translated to &
See attachments for images.
Reporter | ||
Comment 1•11 years ago
|
||
Original french.
Reporter | ||
Comment 2•11 years ago
|
||
Translated to english
Updated•11 years ago
|
Flags: firefox-backlog+
Comment 3•11 years ago
|
||
I believe Felipe actually mentioned this yesterday on IRC!
Assignee | ||
Comment 4•11 years ago
|
||
Yep, that's the one. This is a bug in Bing's service, that happens only for the plain-text strings that we send to it which contains &. It doesn't happen for the text/html strings sent.
I tried Mike's suggestion to replace & with & instead of & but that didn't work :( However, it revealed some very interesting tidbit. Even if I send using the hex version, like:
"Gâteaux & Entremets"
what we get back from the service is...:
"Cakes & desserts"
So it's clearly an internal bug in their output encoding. We will need to have a workaround. Some options:
1 - Do not send as plain-text strings that we've checked that contain &
2 - For plain-text strings, do not encode & and carefully verify that it won't cause invalid XML to be sent
3 - Experiment sending the string wrapped in a CDATA section
4 - Assume that the bug will happen, and unescape & to & on the string received
All options are kinda awful, but I'm leaning towards #4 which is certainly the simpler and safer of them.
Comment 5•11 years ago
|
||
This looks like a blocker bug for the Bing devs.
Meanwhile, there *is* a fifth option to work around this:
5. Un-escape escaped entities with a (simple) regex; so `&` would become `&` and `>gt;` --> >
`.replace(/&(#[0-9]{1,3}|[a-zA-Z]+);(:?#[0-9]{1,3}|[a-zA-Z]+);/, "&$1;");`
Assignee | ||
Comment 6•11 years ago
|
||
Yeah, though I've checked that this only happens with the & char, and it doesn't happen with < and > etc.. So I think we can go that way but with a simpler solution instead of a more comprehensive regexp.
Comment 7•11 years ago
|
||
Comment on attachment 8434689 [details] [diff] [review]
trAmpersand
This looks 'good' to me ;)
Do we have a way to file this bug for the Bing devs? Or did we already do that?
Attachment #8434689 -
Flags: review?(mdeboer) → review+
Assignee | ||
Comment 8•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/a010a557a1b5
They have support forums, I'll try posting it there
Assignee | ||
Comment 9•11 years ago
|
||
Marco, can you add this bug to the current iteration?
Flags: needinfo?(mmucci)
Whiteboard: p=1 [qa-]
Comment 10•11 years ago
|
||
Added to Iteration 32.3
Flags: needinfo?(mmucci)
Whiteboard: p=1 [qa-] → p=1 s=it-32c-31a-30b.3 [qa-]
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 32
Updated•11 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•