diff options
Diffstat (limited to 'src/java/com/juick/http/www')
-rw-r--r-- | src/java/com/juick/http/www/Main.java | 4 | ||||
-rw-r--r-- | src/java/com/juick/http/www/PM.java | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/java/com/juick/http/www/Main.java b/src/java/com/juick/http/www/Main.java index 59065341..47b94387 100644 --- a/src/java/com/juick/http/www/Main.java +++ b/src/java/com/juick/http/www/Main.java @@ -262,6 +262,10 @@ public class Main extends HttpServlet implements Stream.StreamListener { */ @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + if (request.getCharacterEncoding() == null) { + request.setCharacterEncoding("UTF-8"); + } + String uri = request.getRequestURI(); if (uri.equals("/post")) { pagesNewMessage.doPostNewMessage(sql, request, response); diff --git a/src/java/com/juick/http/www/PM.java b/src/java/com/juick/http/www/PM.java index 5c0f67f9..5a07cd5a 100644 --- a/src/java/com/juick/http/www/PM.java +++ b/src/java/com/juick/http/www/PM.java @@ -151,7 +151,7 @@ public class PM { out.println("<form action=\"/pm/send\" method=\"POST\" enctype=\"multipart/form-data\">"); out.println("<div class=\"newpm\">"); out.println(" <div class=\"newpm-to\">To: <input type=\"text\" name=\"uname\" placeholder=\"username\" value=\"" + uname + "\"/></div>"); - out.println(" <div class=\"newpm-body\"><textarea name=\"body\" rows=\"2\" placeholder=\"" + rbg.getString("Reply") + "\" onkeypress=\"postformListener(this.form,event)\"></textarea></div>"); + out.println(" <div class=\"newpm-body\"><textarea name=\"body\" rows=\"2\" onkeypress=\"postformListener(this.form,event)\"></textarea></div>"); out.println(" <div class=\"newpm-send\"><input type=\"submit\" value=\"OK\"/></div>"); out.println("</div>"); out.println("</form>"); |