From dd5903836925331a1265c2cc0b2c84ff4d612bcd Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Mon, 26 Aug 2013 10:29:30 +0200 Subject: [PATCH] Fixes U4-2686 Error when trying to delete member group with ampersand in name. --- .../umbraco/webservices/legacyAjaxCalls.asmx.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/legacyAjaxCalls.asmx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/legacyAjaxCalls.asmx.cs index cd4664f9a3..22647e82c5 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/legacyAjaxCalls.asmx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/legacyAjaxCalls.asmx.cs @@ -68,20 +68,23 @@ namespace umbraco.presentation.webservices public void Delete(string nodeId, string alias, string nodeType) { AuthorizeRequest(true); + + //U4-2686 - alias is html encoded, make sure to decode + alias = HttpUtility.HtmlDecode(alias); //check which parameters to pass depending on the types passed in int intNodeID; if (nodeType == "memberGroup") { - presentation.create.dialogHandler_temp.Delete(nodeType, 0, alias); + create.dialogHandler_temp.Delete(nodeType, 0, alias); } else if (int.TryParse(nodeId, out intNodeID) && nodeType != "member") // Fix for #26965 - numeric member login gets parsed as nodeId { - presentation.create.dialogHandler_temp.Delete(nodeType, intNodeID, alias); + create.dialogHandler_temp.Delete(nodeType, intNodeID, alias); } else { - presentation.create.dialogHandler_temp.Delete(nodeType, 0, nodeId); + create.dialogHandler_temp.Delete(nodeType, 0, nodeId); } }