conversations-classic/src/main/java/eu/siacs/conversations/utils/XmlHelper.java

13 lines
358 B
Java
Raw Normal View History

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("<", "&lt;");
content = content.replace(">", "&gt;");
content = content.replace("\"", "&quot;");
content = content.replace("'", "&apos;");
return content;
}
}