2014-10-22 16:38:44 +00:00
|
|
|
package eu.siacs.conversations.utils;
|
|
|
|
|
|
|
|
public class XmlHelper {
|
|
|
|
public static String encodeEntities(String content) {
|
|
|
|
content = content.replace("&", "&");
|
|
|
|
content = content.replace("<", "<");
|
|
|
|
content = content.replace(">", ">");
|
|
|
|
content = content.replace("\"", """);
|
|
|
|
content = content.replace("'", "'");
|
2016-05-30 19:11:34 +00:00
|
|
|
content = content.replaceAll("\\p{Cc}", "");
|
2014-10-22 16:38:44 +00:00
|
|
|
return content;
|
|
|
|
}
|
|
|
|
}
|