Merge remote-tracking branch 'origin/v8/dev' into netcore/dev

# Conflicts:
#	src/Umbraco.Core/Cache/WebCachingAppCache.cs
#	src/Umbraco.Core/StringExtensions.cs
#	src/Umbraco.Infrastructure/PropertyEditors/UploadFileTypeValidator.cs
#	src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs
#	src/Umbraco.Tests/PublishedContent/NuCacheChildrenTests.cs
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI/Umbraco/js/navigation.controller.js
#	src/Umbraco.Web/Macros/MacroRenderer.cs
#	src/Umbraco.Web/Security/Providers/UsersMembershipProvider.cs
This commit is contained in:
Bjarke Berg
2020-04-01 12:20:43 +02:00
61 changed files with 502 additions and 1042 deletions

View File

@@ -230,21 +230,27 @@ namespace Umbraco.Web
}
}
if (!lengthReached && currentTextLength >= length)
if (!lengthReached)
{
// if the last character added was the first of a two character unicode pair, add the second character
if (Char.IsHighSurrogate((char)ic))
if (currentTextLength == length)
{
var lowSurrogate = tr.Read();
outputtw.Write((char)lowSurrogate);
}
// if the last character added was the first of a two character unicode pair, add the second character
if (char.IsHighSurrogate((char)ic))
{
var lowSurrogate = tr.Read();
outputtw.Write((char)lowSurrogate);
}
// Reached truncate limit.
if (addElipsis)
{
outputtw.Write(hellip);
}
lengthReached = true;
// only add elipsis if current length greater than original length
if (currentTextLength > length)
{
if (addElipsis)
{
outputtw.Write(hellip);
}
lengthReached = true;
}
}
}