diff options
Diffstat (limited to 'src/java/com/juick/http/www/Utils.java')
-rw-r--r-- | src/java/com/juick/http/www/Utils.java | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/java/com/juick/http/www/Utils.java b/src/java/com/juick/http/www/Utils.java index 4c41555e..b2d9a999 100644 --- a/src/java/com/juick/http/www/Utils.java +++ b/src/java/com/juick/http/www/Utils.java @@ -107,20 +107,11 @@ public class Utils { } public static String encodeHTML(String str) { - String ret = str; - ret = ret.replaceAll("&", "&"); - ret = ret.replaceAll("<", "<"); - ret = ret.replaceAll(">", ">"); - ret = ret.replaceAll("'", "'"); - ret = ret.replaceAll("\"", """); - ret = ret.replaceAll("\n", " "); - return str; + return str.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("'", "'").replaceAll("\"", """).replaceAll("\n", " "); } public static String encodeSphinx(String str) { - String ret = str; - ret = ret.replaceAll("@", "\\\\@"); - return ret; + return str.replaceAll("@", "\\\\@"); } public static String fetchURL(String url) { |