Fix UdiString to escape paths

This commit is contained in:
Stephan
2017-05-05 12:46:04 +02:00
parent 8a096cd826
commit eb949e2cbc
3 changed files with 33 additions and 4 deletions

View File

@@ -20,7 +20,7 @@ namespace Umbraco.Core
/// <param name="entityType">The entity type part of the udi.</param>
/// <param name="id">The string id part of the udi.</param>
public StringUdi(string entityType, string id)
: base(entityType, "umb://" + entityType + "/" + id)
: base(entityType, "umb://" + entityType + "/" + Uri.EscapeUriString(id))
{
Id = id;
}
@@ -32,7 +32,7 @@ namespace Umbraco.Core
public StringUdi(Uri uriValue)
: base(uriValue)
{
Id = uriValue.AbsolutePath.TrimStart('/');
Id = Uri.UnescapeDataString(uriValue.AbsolutePath.TrimStart('/'));
}
/// <summary>