Attributes may leak localizations on language change

RESOLVED FIXED in Next

Status

defect
RESOLVED FIXED
6 years ago
2 years ago

People

(Reporter: stas, Assigned: stas)

Tracking

unspecified
Next
x86_64
Linux
Dependency tree / graph

Details

Attachments

(1 attachment)

50 bytes, text/x-github-pull-request
gandalf
: review+
Details | Review
(Assignee)

Description

6 years ago
This is a regression from bug 921169.

If language A defines <foo "Foo A" title: "Bar A"> and language B defines <foo "Foo B"> without the title attribute, the DOM localization logic introduces in bug 921169 will not remove the "Bar A" title attribute from the element when the language is switched from A to B.
Target Milestone: --- → Next
See Also: → 897482
:stas - is that fixed in the updated DOM Overlays?
Flags: needinfo?(stas)
(Assignee)

Comment 2

2 years ago
No, it's not. I added a test to codify the current behavior: https://github.com/projectfluent/fluent.js/commit/e49e23729a45eae771ca653efa8a2822fd272efd

I think one way of fixing this would be to never take ALLOWED_ATTRIBUTES from the sourceElement. I'll see if I can come up with a patch.
Flags: needinfo?(stas)
(Assignee)

Comment 3

2 years ago
Posted file Pull Request
Assignee: nobody → stas
Status: NEW → ASSIGNED
Attachment #8905012 - Flags: review?(gandalf)
No longer blocks: 1365426
Attachment #8905012 - Flags: review?(gandalf) → review+
(Assignee)

Comment 4

2 years ago
Thanks for the r+. I merged this in https://github.com/projectfluent/fluent.js/commit/64ef2120b9f0203d73e1a62e97baf4d7cd9fbb1e
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.