aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http/www/NewMessage.java
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2012-03-06 01:12:39 +0700
committerGravatar Ugnich Anton2012-03-06 01:12:39 +0700
commitb4a7601a14c9077fcfefc083ed39348409d57b76 (patch)
tree956047a7b6d7be1069814db848278b1ddc0c9dfd /src/java/com/juick/http/www/NewMessage.java
parentfaf709b4141f52cdd04a02edad31bf62a32af824 (diff)
User tags, friends, readers
Diffstat (limited to 'src/java/com/juick/http/www/NewMessage.java')
-rw-r--r--src/java/com/juick/http/www/NewMessage.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/java/com/juick/http/www/NewMessage.java b/src/java/com/juick/http/www/NewMessage.java
index d35af8f3..1efb753d 100644
--- a/src/java/com/juick/http/www/NewMessage.java
+++ b/src/java/com/juick/http/www/NewMessage.java
@@ -59,10 +59,13 @@ public class NewMessage {
out.println("<div id=\"webcamwrap\" style=\"width: 320px; margin: 0 auto\"><div id=\"webcam\"></div></div>");
String body = request.getParameter("body");
- if (body != null && body.length() < 4096) {
- body = Utils.encodeHTML(body);
- } else {
+ if (body == null) {
body = "";
+ } else {
+ if (body.length() > 4096) {
+ body = body.substring(0, 4096);
+ }
+ body = Utils.encodeHTML(body);
}
out.println("<p><textarea name=\"body\" class=\"newmessage\" rows=\"7\" cols=\"10\">" + body + "</textarea><br/>");