You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to an incompatible regular expression, Safari does not complete rendering of this site.
The dev console shows this error: SyntaxError: Invalid regular expression: invalid group specifier name
This is the regex causing the issue: /(?<={).*?(?=})/g
The issue is that lookbehind assertions are not supported in Safari (or IE): https://caniuse.com/js-regexp-lookbehind
(Hence the error as it tries to parse the named capture and finds no closing bracket)
This is the only lookbehind assertion I found in this codebase, and it comes from a recent commit to client/app/libs/i18n/index.js
If the assertions are removed but the brackets remain in the regex, I think the string interpolation can be removed in the first usage and a simple .slice(1,-1) would remove them from the second. That said, I'm not familiar enough with this codebase to test that change easily, so not planning to put in a PR.
Reproduction Steps
Using Safari 14.1.1 on Mac or Safari for iOS 15.4, open any page on the site. Note that many page components do not load, including the top bar and and all forms needed to create an account and sign in.
The text was updated successfully, but these errors were encountered:
Description
Due to an incompatible regular expression, Safari does not complete rendering of this site.
The dev console shows this error: SyntaxError: Invalid regular expression: invalid group specifier name
This is the regex causing the issue:
/(?<={).*?(?=})/g
The issue is that lookbehind assertions are not supported in Safari (or IE):
https://caniuse.com/js-regexp-lookbehind
(Hence the error as it tries to parse the named capture and finds no closing bracket)
This is the only lookbehind assertion I found in this codebase, and it comes from a recent commit to client/app/libs/i18n/index.js
If the assertions are removed but the brackets remain in the regex, I think the string interpolation can be removed in the first usage and a simple
.slice(1,-1)
would remove them from the second. That said, I'm not familiar enough with this codebase to test that change easily, so not planning to put in a PR.Reproduction Steps
Using Safari 14.1.1 on Mac or Safari for iOS 15.4, open any page on the site. Note that many page components do not load, including the top bar and and all forms needed to create an account and sign in.
The text was updated successfully, but these errors were encountered: