From b9d03cedeb91a3556e347d84695342723abd61aa Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 25 Mar 2024 17:05:54 -0500 Subject: [PATCH] Update moment.js --- ee/vulnerability-dashboard/assets/dependencies/moment.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ee/vulnerability-dashboard/assets/dependencies/moment.js b/ee/vulnerability-dashboard/assets/dependencies/moment.js index 9428c66bb9fa..98e2e91970b7 100644 --- a/ee/vulnerability-dashboard/assets/dependencies/moment.js +++ b/ee/vulnerability-dashboard/assets/dependencies/moment.js @@ -680,7 +680,7 @@ function getParseRegexForToken (token, config) { // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript function unescapeFormat(s) { - return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { + return regexEscape(s.replace(/\\/g, '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { return p1 || p2 || p3 || p4; })); } @@ -1477,9 +1477,9 @@ function localeWeekdaysParse (weekdayName, format, strict) { mom = createUTC([2000, 1]).day(i); if (strict && !this._fullWeekdaysParse[i]) { - this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i'); - this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i'); - this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i'); + this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i'); + this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i'); + this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i'); } if (!this._weekdaysParse[i]) { regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');