U4-7276 When creating folders in the "Partials" view folder a YSOD appears (Umbraco 7.3 and 7.4)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Web;
|
||||
using Umbraco.Core.CodeAnnotations;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.IO;
|
||||
@@ -52,7 +53,7 @@ namespace umbraco
|
||||
if (IsPartialViewMacro == false)
|
||||
{
|
||||
var attempt = fileService.CreatePartialView(model, snippetName, User.Id);
|
||||
_returnUrl = string.Format("settings/views/EditView.aspx?treeType=partialViews&file={0}", model.Path.TrimStart('/'));
|
||||
_returnUrl = string.Format("settings/views/EditView.aspx?treeType=partialViews&file={0}", HttpUtility.UrlEncode(model.Path.TrimStart('/').Replace("\\", "/")));
|
||||
return attempt.Success;
|
||||
}
|
||||
else
|
||||
@@ -68,7 +69,7 @@ namespace umbraco
|
||||
macroService.Save(new Macro(attempt.Result.Alias, attempt.Result.Alias) { ScriptPath = virtualPath });
|
||||
}
|
||||
|
||||
_returnUrl = string.Format("settings/views/EditView.aspx?treeType=partialViewMacros&file={0}", model.Path.TrimStart('/'));
|
||||
_returnUrl = string.Format("settings/views/EditView.aspx?treeType=partialViewMacros&file={0}", HttpUtility.UrlEncode(model.Path.TrimStart('/').Replace("\\", "/")));
|
||||
return attempt.Success;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user