WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
266933
browser.i18n.getMessage() 'recursively' applies substitutions, can get stuck in infinite loop
https://bugs.webkit.org/show_bug.cgi?id=266933
Summary
browser.i18n.getMessage() 'recursively' applies substitutions, can get stuck ...
5gmiooe8
Reported
2023-12-29 10:55:21 PST
Created
attachment 469240
[details]
Test extension xcode project Using this _locales/en/messages.json: { "hello": { "message": "Hello $1" } } I get this output in Safari's console when inspecting background page or service worker: browser.i18n.getMessage("hello", "world") // "Hello world" browser.i18n.getMessage("hello", "world $2") // "Hello world " browser.i18n.getMessage("hello", ["world $2", "!"]) // "Hello world !" browser.i18n.getMessage("hello", "$1") // ** never returns ** Firefox gives expected results: browser.i18n.getMessage("hello", "world") // "Hello world" browser.i18n.getMessage("hello", "world $2") // "Hello world $2" browser.i18n.getMessage("hello", ["world $2", "!"]) // "Hello world $2" browser.i18n.getMessage("hello", "$1") // "Hello $1"
Attachments
Test extension xcode project
(344.52 KB, application/zip)
2023-12-29 10:55 PST
,
5gmiooe8
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-12-29 10:55:29 PST
<
rdar://problem/120276359
>
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