From f3565dca09c58f6ca5b7b64e06d72a1df204eeb3 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Sat, 26 Jan 2013 21:10:50 +0100 Subject: [PATCH] I normally like to make it absolutely unambiguous... A regex is hard to write, but shouldn't be hard to read. Anyway... --- wcfsetup/install/files/js/WCF.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 997baeece5..c20ab7876c 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -2158,7 +2158,7 @@ WCF.Date.Picker = { // do the actual replacement // this is not perfect, but a basic implementation and should work in 99% of the cases // TODO: support literals (magics are escaped in PHP date() by an \, in jQuery UI DatePicker they are enclosed in '') - this._dateFormat = format.replace(/([^dDjlzFmMnoYyU\\]*(?:\\.[^dDjlzFmMnoYyU\\]*)*)([dDjlzFmMnoYyU]{1})/g, function(match, part1, part2, offset, string) { + this._dateFormat = format.replace(/([^dDjlzFmMnoYyU\\]*(?:\\.[^dDjlzFmMnoYyU\\]*)*)([dDjlzFmMnoYyU])/g, function(match, part1, part2, offset, string) { $.each(replacementTable, function(key, item) { if(part2 == key) { part2 = item; -- 2.20.1