diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/onap/aai/graphgraph/ModelExporter.java | 2 | ||||
-rw-r--r-- | src/main/resources/model_export.vm | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/onap/aai/graphgraph/ModelExporter.java b/src/main/java/org/onap/aai/graphgraph/ModelExporter.java index 474e7de..6064665 100644 --- a/src/main/java/org/onap/aai/graphgraph/ModelExporter.java +++ b/src/main/java/org/onap/aai/graphgraph/ModelExporter.java @@ -40,6 +40,7 @@ import org.apache.velocity.VelocityContext; import org.apache.velocity.app.VelocityEngine; import org.apache.velocity.runtime.RuntimeConstants; import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader; +import org.apache.velocity.tools.generic.EscapeTool; import org.eclipse.jetty.util.StringUtil; import org.onap.aai.edges.EdgeRule; import org.onap.aai.edges.enums.DirectionNotation; @@ -140,6 +141,7 @@ public class ModelExporter { updateEntities(entityList, associationsList, allObjects); context.put("entityList", entityList); context.put("associationList", associationsList); + context.put("esc", new EscapeTool()); return context; } diff --git a/src/main/resources/model_export.vm b/src/main/resources/model_export.vm index ae92fab..a8992c2 100644 --- a/src/main/resources/model_export.vm +++ b/src/main/resources/model_export.vm @@ -51,7 +51,7 @@ #foreach($entity in $entityList) <packagedElement xmi:type="uml:Class" xmi:id="$entity.id" name="$entity.name"> <ownedComment xmi:type="uml:Comment" xmi:id="$entity.randomId" annotatedElement="$entity.id"> - <body>$entity.description</body> + <body>$esc.xml($entity.description)</body> </ownedComment> #foreach($association in $entity.neighbours) #if( $association.isComposition) |