Browse Source

Potential fix for code scanning alert no. 1: Overly permissive regular expression range

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
lechibang-1512 2 months ago
parent
commit
e3e43f368c
No account linked to committer's email
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      sortable.js

+ 1
- 1
sortable.js View File

102
 	}
102
 	}
103
 	if (itm == "") return; 
103
 	if (itm == "") return; 
104
 	sortfn = ts_sort_caseinsensitive;
104
 	sortfn = ts_sort_caseinsensitive;
105
-	if (itm.match(/^\d\d[\/\.-][a-zA-z][a-zA-Z][a-zA-Z][\/\.-]\d\d\d\d$/)) sortfn = ts_sort_date;
105
+	if (itm.match(/^\d\d[\/\.-][a-zA-Z][a-zA-Z][a-zA-Z][\/\.-]\d\d\d\d$/)) sortfn = ts_sort_date;
106
 	if (itm.match(/^\d\d[\/\.-]\d\d[\/\.-]\d\d\d{2}?$/)) sortfn = ts_sort_date;
106
 	if (itm.match(/^\d\d[\/\.-]\d\d[\/\.-]\d\d\d{2}?$/)) sortfn = ts_sort_date;
107
 	if (itm.match(/^-?[£$€Û¢´]\d/)) sortfn = ts_sort_numeric;
107
 	if (itm.match(/^-?[£$€Û¢´]\d/)) sortfn = ts_sort_numeric;
108
 	// ignore stuff in () after the numbers.
108
 	// ignore stuff in () after the numbers.