Closed Bug 1027117 Opened 10 years ago Closed 9 years ago

Remove all uses of innerHTML in localizable content

Categories

(Firefox OS Graveyard :: Gaia::L10n, defect, P4)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: stas, Unassigned)

References

Details

Attachments

(1 file)

When bug 994357 lands we will have a much better and secure alternative to explicitly setting innerHTML on translated elements.  This bug will track the removal of all innerHTML uses in translations.
Blocks: 999779
Priority: -- → P4
SMS refactor landed last week, Settings is in review. It leaves System as the last big one to fix.
Depends on: 1171206, 1187668
Depends on: 1191163
Comment on attachment 8652056 [details] [review]
[gaia] zbraniecki:1027117-remove-innerHTML-from-l10n > mozilla-b2g:master

We're *that* close to be done with .innerHTML.
Attachment #8652056 - Flags: review?(stas)
Depends on: 1196014
Comment on attachment 8652056 [details] [review]
[gaia] zbraniecki:1027117-remove-innerHTML-from-l10n > mozilla-b2g:master

This looks great, thanks Zibi.

I wonder if this is the right moment to also fix the JS code which handled those <spans> in translations:  binding events to them, showing and hiding them etc.  We could add a single span to the source HTML and bind to it, since DOM overlays maintain the identity of elements.

What do you think?
Attachment #8652056 - Flags: review?(stas) → review+
Commit: https://github.com/mozilla-b2g/gaia/commit/60b924537fc116e5ff77712985571d70c7b37fb4
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
This needs to land in l20n.js v2.x.
(In reply to Staś Małolepszy :stas from comment #7)
> This needs to land in l20n.js v2.x.

https://github.com/l20n/l20n.js/commit/1057c621946e96db99ec1fcf4ebeebccf9a97108
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: