Skip to content

Commit da32121

Browse files
authored
Vuln dashboard: Update moment dependency to resolve code scanning alerts (#17849)
Related to: #17764 Changes: - Updated ee/vulnerability-dashboard/assets/dependencies/moment.js to resolve two code scanning alerts.
1 parent 3d46b0d commit da32121

File tree

1 file changed

+4
-4
lines changed
  • ee/vulnerability-dashboard/assets/dependencies

1 file changed

+4
-4
lines changed

ee/vulnerability-dashboard/assets/dependencies/moment.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ function getParseRegexForToken (token, config) {
680680

681681
// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
682682
function unescapeFormat(s) {
683-
return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
683+
return regexEscape(s.replace(/\\/g, '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
684684
return p1 || p2 || p3 || p4;
685685
}));
686686
}
@@ -1477,9 +1477,9 @@ function localeWeekdaysParse (weekdayName, format, strict) {
14771477

14781478
mom = createUTC([2000, 1]).day(i);
14791479
if (strict && !this._fullWeekdaysParse[i]) {
1480-
this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i');
1481-
this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i');
1482-
this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i');
1480+
this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i');
1481+
this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i');
1482+
this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i');
14831483
}
14841484
if (!this._weekdaysParse[i]) {
14851485
regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');

0 commit comments

Comments
 (0)