Seamonkey breaks on most pages because it doesn't support modern RegExp
Summary
For about half a year the Gitlab website and my company's local gitlab website are broken when visiting using Seamonkey due to a (too new? invalid?) regular expression.
Almost all pages break (images don't load, loading throbbers remain in various critical places) with a syntax error at a regular expression using \p{Emoji} in combination with the "u" flag.
The culprit is this command:
const e=t.match(/^\p{Emoji}/u);
Without the 'u' flag this regexp does not produce an syntax error (I don't know if it still produces the desired result) and the removal of the \p{Emoji}, (but with the u-flag) it also does not produce an syntax error. So it seems to be the combination.
Even "helloWorld".match(/^\p{Emoji}/u) results in a syntax error on the Seamonkey Javascript console.
new RegExp('^\p{Emoji}', 'u')
throws this error in Seamonkey:
SyntaxError: raw brace is not allowed in regular expression with unicode flag
On Firefox and Chromium this notation results in
SyntaxError: Invalid regular expression: /^p{Emoji}/: Incomplete quantifier
I don't know if this regexp is indeed invalid and other browsers just handle the shorthand differently, or Seamonkey is in error here. Nonetheless new emoji handling should not completely break gitlab.
Steps to reproduce
- Use Seamonkey on Ubuntu or Mint
I simply have not checked other OSes. I ran into it on my daily Ubuntu and confirmed it on a fresh Mint install. My userAgent is
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 SeaMonkey/2.53.10.1 This a firefox68 equivalent and includes security fixes up to Firefox 91.4.1 ESR (Can somebody try this with firefox 68 and/or 91?)
- Open any repository page. This can be you own hosted repositore or gitlab.com. For example https://gitlab.com/explore
Upon first visit you'll get a "checking browser for use on gitlab.com". This passes normally. (So Seamonkey should be supported?) On the projects overview page you'll notice your profile image and all project (bitmap) icons are missing. Javascript pulldown menu's don't open when clicked/hovered, etc. On the javascript console you'll find the error. Most of the sub-pages will not show their main content but only a throbber, as javascript execution is aborted.