follow-up to r66913 - fix off by one error in the char counting javascript for the...
authorBrian Wolff <bawolff@users.mediawiki.org>
Fri, 11 Jun 2010 20:18:53 +0000 (20:18 +0000)
committerBrian Wolff <bawolff@users.mediawiki.org>
Fri, 11 Jun 2010 20:18:53 +0000 (20:18 +0000)
skins/common/edit.js

index 4ce781f..3f8c862 100644 (file)
@@ -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;