Reject messages consisting solely of whitespace.

Trac #1701

(imported from commit 48a172e17f69d11596ecf9a5b13cd48a074966c3)
This commit is contained in:
Kevin Mehall 2013-08-16 17:34:25 -04:00
parent 00fc004be2
commit e6de154e0d
1 changed files with 1 additions and 1 deletions

View File

@ -488,7 +488,7 @@ exports.validate = function () {
$("#compose-send-button").attr('disabled', 'disabled').blur();
$("#sending-indicator").show();
if (exports.message_content() === "") {
if (/^\s*$/.test(exports.message_content())) {
compose_error("You have nothing to send!", $("#new_message_content"));
return false;
}