From: Brian Wolff Date: Fri, 11 Jun 2010 20:18:53 +0000 (+0000) Subject: follow-up to r66913 - fix off by one error in the char counting javascript for the... X-Git-Tag: 1.31.0-rc.0~36536 X-Git-Url: http://git.cyclocoop.org/%22%2C%20generer_url_ecrire%28?a=commitdiff_plain;h=3924988da204e135f4621c46f9facfb3fb64e124;p=lhc%2Fweb%2Fwiklou.git follow-up to r66913 - fix off by one error in the char counting javascript for the summary field. --- diff --git a/skins/common/edit.js b/skins/common/edit.js index 4ce781fd77..3f8c8624cf 100644 --- a/skins/common/edit.js +++ b/skins/common/edit.js @@ -256,7 +256,8 @@ addOnloadHook(function () { //such as illegal sequences, but that should never happen. len = summary.value.replace(/[\u0080-\u07FF\uD800-\uDFFF]/g, '**').replace(/[\u0800-\uD7FF\uE000-\uFFFF]/g, '***').length; - if (len > 250) { + //247 as this doesn't count character about to be inserted. + if (len > 247) { if (e.preventDefault) e.preventDefault(); e.returnValue = false; //IE return false;