I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 553201db authored by str4d's avatar str4d
Browse files

Fix for #588 part 3: Escape & character FIRST so other escapes aren't broken

parent 452096b9
No related branches found
No related tags found
No related merge requests found
......@@ -1476,8 +1476,8 @@ public class DataHelper {
public static String escapeHTML(String unescaped) {
if (unescaped == null) return "";
Map<String, String> map = new HashMap<String, String>();
map.put("\"","&quot;");
map.put("&","&amp;");
map.put("\"","&quot;");
map.put("<","&lt;");
map.put(">","&gt;");
String escaped = unescaped;
......@@ -1497,8 +1497,8 @@ public class DataHelper {
public static String unescapeHTML(String escaped) {
if (escaped == null) return "";
Map<String, String> map = new HashMap<String, String>();
map.put("&quot;","\"");
map.put("&amp;","&");
map.put("&quot;","\"");
map.put("&lt;","<");
map.put("&gt;",">");
String unescaped = escaped;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment