WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
312967
Two adjacent placeholders for the i18n replacement are wrongly replaced.
https://bugs.webkit.org/show_bug.cgi?id=312967
Summary
Two adjacent placeholders for the i18n replacement are wrongly replaced.
Kanaru Sato
Reported
2026-04-21 23:24:31 PDT
Named placeholder substitution in WebExtensions localization (`i18n.getMessage`) fails when two placeholders are adjacent. Step to reproduce: - set a message in messages.json as follows: ``` "adjacent_named": { "message": "$prefix$$suffix$", "placeholders": { "prefix": { "content": "$1" }, "suffix": { "content": "$2" } } } ``` - Then call like this from JavaScript. ``` const args = ["3", "4"]; console.log(browser.i18n.getMessage("adjacent_named", args)); ``` Expected Result: - it shows `34`. Actual result: - it shows `3$SUFFIX$`.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2026-04-21 23:24:37 PDT
<
rdar://problem/175315700
>
Kanaru Sato
Comment 2
2026-04-21 23:25:15 PDT
See also:
https://github.com/WebKit/WebKit/pull/62313
EWS
Comment 3
2026-04-22 07:03:02 PDT
Committed
311769@main
(9d2313b02b23): <
https://commits.webkit.org/311769@main
> Reviewed commits have been landed. Closing PR #63298 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug