From 758d461823eb02ee77dcfb105233e171f2b076d9 Mon Sep 17 00:00:00 2001 From: Skeeve Date: Wed, 29 Jan 2014 13:43:34 +0100 Subject: [PATCH] Update utils.js I think /\\/g is wrong as it will remove every \ from the string. I think, the usual way of keeping the following character is more appropriate. --- core/modules/utils/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/utils/utils.js b/core/modules/utils/utils.js index 0bb936177..921dd0724 100644 --- a/core/modules/utils/utils.js +++ b/core/modules/utils/utils.js @@ -166,7 +166,7 @@ exports.formatDateString = function (date,template) { var tz = date.getTimezoneOffset(); var atz = Math.abs(tz); t = t.replace(/TZD/g,(tz < 0 ? '+' : '-') + $tw.utils.pad(Math.floor(atz / 60)) + ':' + $tw.utils.pad(atz % 60)); - t = t.replace(/\\/g,""); + t = t.replace(/\\(.)/g,"$1"); return t; };