aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/http/www/Utils.java
diff options
context:
space:
mode:
authorGravatar Alex Bitney2016-02-07 00:00:41 +0200
committerGravatar Alex Bitney2016-02-07 00:00:41 +0200
commitc2d316449f85bd2b74ae9ffaa3d08b7a5ee282cf (patch)
treece808c6d65e4a61913497f5d397473f75fadc701 /src/main/java/com/juick/http/www/Utils.java
parent1fffebc18bbdbe87b456e2b3bd66e9ce5a6afcb8 (diff)
added tags when posting new message
added templates engine (rythm engine) and moved something to it. WARNING: textext plugin does not work when minimized, and also I fixed bug in it.
Diffstat (limited to 'src/main/java/com/juick/http/www/Utils.java')
-rw-r--r--src/main/java/com/juick/http/www/Utils.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/java/com/juick/http/www/Utils.java b/src/main/java/com/juick/http/www/Utils.java
index ab721020..16428842 100644
--- a/src/main/java/com/juick/http/www/Utils.java
+++ b/src/main/java/com/juick/http/www/Utils.java
@@ -162,6 +162,7 @@ public class Utils {
}
public static String encodeHTML(String str) {
+ if (str == null) return null;
return str.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll("'", "&apos;").replaceAll("\"", "&quot;").replaceAll("\n", "&#10;");
}