Open bingcoder opened 2 years ago
@bingcoder Please provide the error.
Chrome 49 is old, I'm not sure how I would test back that far.
We have the same problem, but in IE11 (Outlook unfortunately still uses IE to render add-ins in many configurations).
The error is just SyntaxError in regular expression
, apparently because IE/the old Chrome don't support /u for regexes.
In the IE dev-console /1/u.test("1")
has the same error as simple test.
Since this is potentially an easy fix I'll take a look at it... It might be possible to rewrite this so it uses surrogate pairs.
@bingcoder @ayonix If you change it so it reads:
'idn-email': /^("(?:[!#-\[\]-\uFFFF]|\\[\t -\uFFFF])*"|[!#-'*+\-/-9=?A-Z\^-\uFFFF](?:\.?[!#-'*+\-/-9=?A-Z\^-\uFFFF])*)@([!#-'*+\-/-9=?A-Z\^-\uFFFF](?:\.?[!#-'*+\-/-9=?A-Z\^-\uFFFF])*|\[[!-Z\^-\uFFFF]*\])$/
Does that work for you?
That regex alone seems to work, in 1.4.1 are more issues for IE though.
When i replace the regex with yours, the next complaint of it is: SCRIPT5021: Invalid range in character set
which seems to be the [~-\u{10FFFF}]
in iri-reference
.
Also there are more /u flags on regexes: iri-reference
,uri-template
,json-pointer
,relative-json-pointer
and maybe something else I've missed.
Thanks for looking into it :)
v1.4.1 add regexp /^("(?:[!#-[]-\u{10FFFF}]|\[\t -\u{10FFFF}])...$/u not support chrome 49
Whether to abandon support for Chrome 49?
Thanks