[localize] Nested msg call inside html next to attribute creates invalid placeholder
Open
@aomarks is already working on this.
Since Feb 16, 2023.
- Dominant language
- TypeScript
- Stars
- 21.8k
- Forks
- 1.1k
- Avg merge
- 18h 25m
- Merged PRs (30d)
- 2
Description
`msg(html(msg)))` when the `msg` is placed as an attribute value produces invalid placeholder when extracted and fails when utilized during build. This affects both runtime and transform mode, and xliff and xlb format.
This
```ts
msg(html`Hello ${"World"}!`);
```
produces
```xml
Hello !
```
expected
```xml
Hello !
```
I suspect that the placeholder's `equiv-text` is getting html encoded twice so the `"` becomes `"` as well as having the quotes added around the expression (is that actually expected/necessary?)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.