Bug 477381 - [GenDoc] cleanAndFormat produces xml-encoded characters.
Change-Id: I94177d0a9ecd96857f8cdf528944b0c5751a57e8
diff --git a/plugins/org.eclipse.gendoc.bundle.acceleo.commons/src/org/eclipse/gendoc/bundle/acceleo/commons/files/CommonService.java b/plugins/org.eclipse.gendoc.bundle.acceleo.commons/src/org/eclipse/gendoc/bundle/acceleo/commons/files/CommonService.java
index fd58789..ce999b4 100644
--- a/plugins/org.eclipse.gendoc.bundle.acceleo.commons/src/org/eclipse/gendoc/bundle/acceleo/commons/files/CommonService.java
+++ b/plugins/org.eclipse.gendoc.bundle.acceleo.commons/src/org/eclipse/gendoc/bundle/acceleo/commons/files/CommonService.java
@@ -11,6 +11,8 @@
* Anne Haugommard (Atos Origin) anne.haugommard@atosorigin.com
* - Initial API and implementation
* - Add format service
+ * Antonio Campesino (Ericsson) - Bug 477381 - [GenDoc] cleanAndFormat produces
+ * xml-encoded characters.
*
*****************************************************************************/
package org.eclipse.gendoc.bundle.acceleo.commons.files;
@@ -430,10 +432,11 @@
}
index = end;
}
- if( no_tag_found){
- SPECIAL_CHARACTERS.put("&", "&");
- }
cleanedInput +=(input.substring(index));
+ if( no_tag_found){
+ //SPECIAL_CHARACTERS.put("&", "&");
+ cleanedInput = cleanedInput.replace("&", "&");
+ }
// Handle other special characters
for (String key : SPECIAL_CHARACTERS.keySet()){
cleanedInput = cleanedInput.replace(key, SPECIAL_CHARACTERS.get(key));