diff --git a/resource/chat.py b/resource/chat.py
index a01c472..e8cb022 100644
--- a/resource/chat.py
+++ b/resource/chat.py
@@ -99,7 +99,7 @@ def render_POST(self, request):
try:
req.write("message coming")
req.finish()
- except:
+ except BaseException:
pass
self.request_pool = []
return "chat posted"
diff --git a/template/article_editor.html b/template/article_editor.html
index 17e41e0..06a4c06 100644
--- a/template/article_editor.html
+++ b/template/article_editor.html
@@ -36,7 +36,7 @@
-
+
@@ -66,5 +66,10 @@
.val(editor.getValue());
}
)
+ $('form').submit(function(e) {
+ if(!$('textarea[name=content]').val()) {
+ e.preventDefault(e);
+ }
+ });
{% endblock %}