diff --git a/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-property-group-menus.ftl b/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-property-group-menus.ftl
index fc794ab72..df68bbd06 100644
--- a/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-property-group-menus.ftl
+++ b/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-property-group-menus.ftl
@@ -19,7 +19,7 @@
<#assign groupnameHtmlId = p.createPropertyGroupHtmlId(groupname) >
<#-- capitalize will capitalize each word in the name; cap_first only the first. We may need a custom
function to capitalize all except function words. -->
-
${groupname?capitalize}
+ ${groupname?capitalize}
#if>
#if>
#list>
@@ -44,7 +44,7 @@
<#if groupName?has_content>
<#--the function replaces spaces in the name with underscores, also called for the property group menu-->
<#assign groupNameHtmlId = p.createPropertyGroupHtmlId(groupName) >
- ${groupName?capitalize}
+ ${groupName?capitalize}
<#else>
${i18n().properties_capitalized}
#if>
diff --git a/webapp/src/main/webapp/templates/freemarker/lib/lib-properties.ftl b/webapp/src/main/webapp/templates/freemarker/lib/lib-properties.ftl
index 881e7e412..aae31c78b 100644
--- a/webapp/src/main/webapp/templates/freemarker/lib/lib-properties.ftl
+++ b/webapp/src/main/webapp/templates/freemarker/lib/lib-properties.ftl
@@ -334,6 +334,10 @@ name will be used as the label. -->
<#--Property group names may have spaces in them, replace spaces with underscores for html id/hash-->
<#function createPropertyGroupHtmlId propertyGroupName>
- <#return propertyGroupName?replace(" ", "_")>
+ <#local groupName = propertyGroupName?replace(" ", "_")>
+ <#local groupName = groupName?replace("/", "-slash-")>
+ <#local groupName = groupName?replace(",", "-comma-")>
+ <#local groupName = groupName?replace("&", "-and-")>
+ <#return groupName>
#function>