revert JAXB issues on NamedArea
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / jaxb / FormattedTextAdapter.java
index c0ff326d6dc7e70c9986c5adc83a872e6f091762..3d36bc5ef24b20ce22640e32567b6a7e27ba28f0 100644 (file)
@@ -1,3 +1,12 @@
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy\r
+* http://www.e-taxonomy.eu\r
+*\r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/ \r
+\r
 package eu.etaxonomy.cdm.jaxb;\r
 \r
 import java.io.StringReader;\r
@@ -39,6 +48,7 @@ public class FormattedTextAdapter extends XmlAdapter<FormattedText,java.lang.Str
                                                         "xmlns:view",\r
                                                         "xmlns:xsi"};\r
 \r
+       @SuppressWarnings("unused")\r
        private static final Log logger = LogFactory.getLog(FormattedTextAdapter.class);\r
        \r
        public FormattedText marshal(String string) throws Exception {\r
@@ -102,6 +112,8 @@ public class FormattedTextAdapter extends XmlAdapter<FormattedText,java.lang.Str
                StringWriter stringWriter = new StringWriter();\r
                Result output = new StreamResult(stringWriter);\r
                transformer.transform(input, output);\r
-               return stringWriter.toString();\r
+               String result = stringWriter.toString();\r
+               result = StringEscapeUtils.unescapeXml(result);\r
+               return result;\r
        }\r
 }\r