aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http/www/Utils.java
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2012-12-31 16:59:26 +0700
committerGravatar Ugnich Anton2012-12-31 16:59:26 +0700
commitd95df2184dbb9931db3a5eea0f4ea41a59ca4214 (patch)
tree528ec263b745c808a0608be9ebf6a494286a7e5e /src/java/com/juick/http/www/Utils.java
parented2f70f338bbed7b608fcc5b07f751d5b99d4f53 (diff)
search input box improvement
Diffstat (limited to 'src/java/com/juick/http/www/Utils.java')
-rw-r--r--src/java/com/juick/http/www/Utils.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/java/com/juick/http/www/Utils.java b/src/java/com/juick/http/www/Utils.java
index 15782bf0..38550691 100644
--- a/src/java/com/juick/http/www/Utils.java
+++ b/src/java/com/juick/http/www/Utils.java
@@ -104,10 +104,12 @@ public class Utils {
public static String encodeHTML(String str) {
String ret = str;
+ ret = ret.replaceAll("&", "&");
ret = ret.replaceAll("<", "&lt;");
ret = ret.replaceAll(">", "&gt;");
ret = ret.replaceAll("'", "&apos;");
ret = ret.replaceAll("\"", "&quot;");
+ ret = ret.replaceAll("\n", "&#10;");
return str;
}