Open matt-sweda-calder opened 1 month ago
I guess I'm not sure whether the issue is because of the URL_REGEX or the EMAIL_REGEX.
I'm using Safari Version 15.6 (17613.3.9.1.5)
Tried on beta.67 and it is still an issue
Also worth adding, I'm seeing this in a local dev environment. EDIT: it still exists in prod, but it doesn't stop script execution, instead it just shows an unhandled promise error in the console.
Link to reproduction
No response
Payload Version
3.0.0-beta.59
Node Version
v21.6.2
Next.js Version
15.0.0-canary.68
Describe the Bug
Because of the regex at: https://github.com/payloadcms/payload/blob/18645771c86664f1246f0fb599c8265a4cd1d6c0/packages/richtext-lexical/src/field/features/Link/plugins/autoLink/index.tsx#L416
...some pages are broken on safari and script execution stops, it seems to be related to this ongoing safari bug: https://stackoverflow.com/questions/51568821/works-in-chrome-but-breaks-in-safari-invalid-regular-expression-invalid-group
Reproduction Steps
I setup a Payload/NextJS app using the richtext lexical editor. When I visit a page that fetches and displays rich text data, the safari console shows the error in the screenshot above.
Adapters and Plugins
No response