#1172 Text content is wrong after decompilation: double escape fixed

This commit is contained in:
honfika@gmail.com
2016-02-29 08:52:46 +01:00
parent 1a74bd5ef9
commit 46c157092c
2 changed files with 20 additions and 23 deletions

View File

@@ -1109,8 +1109,8 @@ public class Helper {
}
public static String escapeHTML(String text) {
String[] from = new String[]{"&", "<", ">", "\"", "'", "/"};
String[] to = new String[]{"&amp;", "&lt;", "&gt;", "&quot;", "&#x27;", "&#x2F;"};
String[] from = new String[]{"&", "<", ">", "\"", "'", "/", "\r\n", "\r", "\n"};
String[] to = new String[]{"&amp;", "&lt;", "&gt;", "&quot;", "&#x27;", "&#x2F;", "&#xD;", "&#xD;", "&#xD;"};
for (int i = 0; i < from.length; i++) {
text = text.replace(from[i], to[i]);
}