package fr.insee.rmes.utils;

public class XmlUtils {
	
	public static String encodeXml(String s) {
		 return s.replaceAll("&lt;([a-zA-Z]+)&gt;", "<$1>") //xml open tag
				 .replaceAll("&lt;/([a-zA-Z]+)&gt;", "</$1>") //xml close tag
				 .replaceAll("&lt;([a-zA-Z]+)/&gt;", "<$1/>") //br
				 .replaceAll("&lt;([a-zA-Z]+) /&gt;", "<$1 />"); //br with space
	}

}

@@ -334,17 +334,16 @@
 %3C$1 /%3E%22)
-;
  //br wi
@@ -351,14 +351,108 @@
 h space%0A
+%09%09%09%09 .replaceAll(%22&lt;a href=&quot;(.*?)&quot;&gt;%22, %22%3Ca href=%5C%22$1%5C%22%3E /%3E%22); //a href open tag%0A
 %09%7D%0A%0A%7D%0A

Fix issue with href tag