diff --git a/configuration/src/main/resources/META-INF/shibboleth3/idp/attribute-filter.xml.vm b/configuration/src/main/resources/META-INF/shibboleth3/idp/attribute-filter.xml.vm
index 2ecefde60..ce541f60b 100644
--- a/configuration/src/main/resources/META-INF/shibboleth3/idp/attribute-filter.xml.vm
+++ b/configuration/src/main/resources/META-INF/shibboleth3/idp/attribute-filter.xml.vm
@@ -26,12 +26,12 @@
#foreach( $entityId in $trustParams.trustEntityIds.get($trustRelationship.inum) )
-
+
#end
#else
-
+
#end
#else
@@ -39,12 +39,12 @@
#foreach( $entityId in $trustParams.trustEntityIds.get($trustRelationship.inum) )
-
+
#end
#else
-
+
#end
#end
diff --git a/configuration/src/main/resources/META-INF/shibboleth3/idp/relying-party.xml.vm b/configuration/src/main/resources/META-INF/shibboleth3/idp/relying-party.xml.vm
index 52a166392..cffa05cbd 100644
--- a/configuration/src/main/resources/META-INF/shibboleth3/idp/relying-party.xml.vm
+++ b/configuration/src/main/resources/META-INF/shibboleth3/idp/relying-party.xml.vm
@@ -105,7 +105,7 @@
#set($entityId = $trustRelationship.getEntityId())
#set($relyingPartyId = $StringHelper.removePunctuation($trustRelationship.inum))
-
+
#if($trustRelationship.specificRelyingPartyConfig and (not $trustRelationship.isFederation()))
diff --git a/pom.xml b/pom.xml
index c8dc05d36..8bcde7a29 100644
--- a/pom.xml
+++ b/pom.xml
@@ -37,6 +37,7 @@
2.0.0.Final
2.1.0.CR1
2.1.0
+ 3.0
GluuFederation_oxTrust
${project.groupId}:${project.artifactId}
@@ -418,6 +419,12 @@
validation-api
2.0.1.Final
+
+
+ org.apache.velocity.tools
+ velocity-tools-generic
+ ${velocity-tools.version}
+
diff --git a/service/pom.xml b/service/pom.xml
index e19b153e7..9804bed34 100644
--- a/service/pom.xml
+++ b/service/pom.xml
@@ -198,6 +198,11 @@
velocity-engine-core
+
+ org.apache.velocity.tools
+ velocity-tools-generic
+
+
org.jboss.resteasy
diff --git a/service/src/main/java/org/gluu/oxtrust/service/Shibboleth3ConfService.java b/service/src/main/java/org/gluu/oxtrust/service/Shibboleth3ConfService.java
index 106c2e411..514f03deb 100644
--- a/service/src/main/java/org/gluu/oxtrust/service/Shibboleth3ConfService.java
+++ b/service/src/main/java/org/gluu/oxtrust/service/Shibboleth3ConfService.java
@@ -37,6 +37,7 @@
import org.apache.commons.io.IOUtils;
import org.apache.commons.io.LineIterator;
import org.apache.commons.lang3.StringUtils;
+import org.apache.velocity.tools.generic.EscapeTool;
import org.apache.velocity.VelocityContext;
import org.gluu.config.oxtrust.AppConfiguration;
import org.gluu.config.oxtrust.AttributeResolverConfiguration;
@@ -687,6 +688,7 @@ private VelocityContext prepareVelocityContext(HashMap trustPara
VelocityContext context = new VelocityContext();
context.put("StringHelper", StringHelper.class);
+ context.put("esc",new EscapeTool());
context.put("salt", configurationFactory.getCryptoConfigurationSalt());
context.put("trustParams", trustParams);