diff --git a/source/java/org/alfresco/web/ui/common/Utils.java b/source/java/org/alfresco/web/ui/common/Utils.java index acada27f28..c4e2ca2c1a 100644 --- a/source/java/org/alfresco/web/ui/common/Utils.java +++ b/source/java/org/alfresco/web/ui/common/Utils.java @@ -270,6 +270,10 @@ public final class Utils extends StringUtils buf.append(name); buf.append("'].value='"); String val = params.get(name); + if(val != null) + { + val = Utils.encode(val); + } val = replace(val, "\\", "\\\\"); // encode escape character val = replace(val, "'", "\\'"); // encode single quote as we wrap string with that buf.append(val); diff --git a/source/web/jsp/groups/new-group.jsp b/source/web/jsp/groups/new-group.jsp index a50952dbec..7eb3ce1dd8 100644 --- a/source/web/jsp/groups/new-group.jsp +++ b/source/web/jsp/groups/new-group.jsp @@ -32,12 +32,16 @@ <%@ page import="org.alfresco.web.ui.common.PanelGenerator" %> + + + function validate() + { + if (finishButtonPressed) + { + finishButtonPressed = false; + + var message = (window.gecko) ? $("dialog:dialog-body:validation_invalid_character").textContent : $("dialog:dialog-body:validation_invalid_character").innerText; + return validateName(document.getElementById("dialog:dialog-body:name"), + message, + true); + } + else + { + return true; + } + } + + +