From 17b2ea541c2ed1aa4edb28cc7b23c08510fab736 Mon Sep 17 00:00:00 2001 From: qw3rty Date: Fri, 11 Jun 2010 18:22:53 +0000 Subject: [PATCH] OSQA-313 users can no longer add repeating spaces to get around the minimum comment length. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@409 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- forum/skins/default/media/js/osqa.main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/forum/skins/default/media/js/osqa.main.js b/forum/skins/default/media/js/osqa.main.js index c78367b..8326eb0 100644 --- a/forum/skins/default/media/js/osqa.main.js +++ b/forum/skins/default/media/js/osqa.main.js @@ -390,7 +390,7 @@ $(function() { cleanup_form(); function process_form_changes() { - var length = $textarea.val().length; + var length = $textarea.val().replace(/[ ]{2,}/g," ").length; if (current_length == length) return; @@ -406,6 +406,7 @@ $(function() { $chars_togo_message.show(); $chars_counter.html(min_length - length); } else { + length = $textarea.val().length; $chars_togo_message.hide(); $chars_left_message.show(); $chars_counter.html(max_length - length); -- 2.39.5