2.0.4, and 2.0.5 causing exception on Safari 16.3 and earlier

2.0.4, and 2.0.5 causing exception on Safari 16.3 and earlier

jason_permietechjason_permietech Posts: 3Questions: 1Answers: 0

Link to test case: just load DT 2.0.4 or 2.0.5 in a Safari 16.3 browser or earlier
Error messages shown: SyntaxError: Invalid regular expression: invalid group specifier name
Description of problem: Looks like the recent fix (line 7966 in 2.0.5 not-minified, function __details_state_load) is causing the error shown above in Safari 16.3 and earlier. This is because lookbehind regular expressions are not supported.

While I'd love to not worry about this unfortunately some of our users are impacted.

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    Bother! Really sorry about that. I'll see if I can come up with a regex that works in Safari and satisfies the automocode scanners as well. Will get back to you!

    Allan

  • jason_permietechjason_permietech Posts: 3Questions: 1Answers: 0

    great thx, i just reverted that line for now but would be nice to have resolved in future releases.

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    I've committed a change (actually, I had to try a few times to find a combination that kept the code scanners happy, as well as Safari). I've tested it in Safari 15 and it works okay. If you want to try it it is available here.

    It will be in DataTables 2.0.6 which I'll release note too far away.

    Allan

  • MolasarMolasar Posts: 1Questions: 0Answers: 0

    Works!!! I have Safari 15.6.1 on OS Catalina 10.15.7 and the "original" dataTables.js 2.0.5 was throwing a RegEx error (and some other Can't Find DataTable whatever). Downloaded the version posted above and works like a charm. I registered on this site just to chime in and say THANK YOU!!!

  • jason_permietechjason_permietech Posts: 3Questions: 1Answers: 0

    Thanks Allan I couldn't get to this until now but it'll all good.

Sign In or Register to comment.